java.lang.Error: Unresolved compilation problems

java.lang.Error : Unresolved compilation problems

java.lang.Error : Unresolved compilation problems

Environment description solution reason

environment

jdk1.8 + springboot + maven + ItelliJ IDEA

describe

When starting a project, initialize the datasource to report an error. The specific error is to say that a POJO cannot be resolved to a type , and repeatedly check that the POJO exists and has been relied on in POM .

A few days ago, it can be started normally. Other colleagues can start normally, and the code has not been modified.

Solution

The search results are generally caused by the inconsistency between the version of JDK compiled by eclipse or idea and the version of JDK required by the project. However, the configuration of any development environment has been modified recently. After careful inspection, it is found that the java complier and Project SDK versions are the same.

There is an answer on stackoverflow that is to say MVN clean once, try it and find that it can be started successfully

reason

It may be that the previous MVN clean install did not have the correct clean , resulting in some compiled codes not being updated.

Read More: