Pages

11 September, 2024

Spring boot app (error: method getFirst()) failed to run at local machine, but can run on server

The Spring boot app can run on the online server. Now, we want to replicate the same app at the local machine but the Spring boot jar file failed to run and had the below error.


I read Compilation error on List.getFirst(): cannot find symbol?
The answer stated the issue caused by the different java version of the online server and the local machine. But I checked they both used java 21.


Error message
JSONWebMvcConfigurer.java:
java: cannot find symbol
symbol: method addFirst(com.alibaba.fastjson2.support.spring6.http.converter.FastJsonHttpMessageConverter)
location: variable converters of type java.util.List

No comments:

Post a Comment

Thanks