java: cannot access org.springframework.web.bind.annotation.GetMapping bad class file

1.问题

java: cannot access org.springframework.web.bind.annotation.GetMapping
  bad class file: /C:/enviroment/apache-maven-3.8.6-bin/apache-maven-3.8.6/maven-repo/org/springframework/spring-web/6.0.4/spring-web-6.0.4.jar!/org/springframework/web/bind/annotation/GetMapping.class
    class file has wrong version 61.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.

原因:

jdk版本1.8 与 spring boot 版本不匹配
降级 springboot的版本号

2.解决方法

java: cannot access org.springframework.web.bind.annotation.GetMapping bad class file_第1张图片
启动成功!

你可能感兴趣的:(排错bug,java,前端,spring,boot)