Error content
java: Cannot access org.springframework.context.annotation.Bean Error class file: /D:/maven/repository/org/springframework/spring-context/6.0.7/spring-context-6.0.7.jar!/org /springframework/context/annotation/Bean.class
class file has wrong version 61.0, should be 52.0
Please delete the file or make sure it is in the correct classpath subdirectory
Error reason
SpringBoot uses 3.0 or above, because the official release of Spring supports JDK17 at least starting from Spring6 and SprinBoot3.0
So just reduce the SpringBoot version to below 3.0 to
solve the problem
Reduce the SpringBoot version to a version below 3.0 at will, and refresh the Maven
test successfully