spring version is not compatible with JDK problem

There is a problem in Spring project on experimental book time, when importing packages and use the comments eclipse occurs error.

Import Package error: The import org can not be resolved

Notes error: component can not be resolved to a type

After the online inquiry found that incompatibility between versions Spring and JDK version, I use spring4, is not compatible JDK11, I downloaded the JDK8.

See attached correspondence between: https://blog.csdn.net/tutu_flying_pig/article/details/83416549

Modification methods are detailed in the JDK posted: https://blog.csdn.net/zeal9s/article/details/85090545

Open eclipse-> window-> preferences-> java-> install JRES click ADD, add JDK8 directory

Right-click the project Build Path-> Config Build Path, the JRE 1.8 is replaced Libraries

Change the Java compiler 1.8

 

Also to be changed as well as Project Faces

 After the completion point Apply eclipse is not being given.

The latest version of Spring5 support JDK11, use Spring5 should not have this problem.

Guess you like

Origin www.cnblogs.com/zhangsblog12345/p/10924132.html