springboot项目启动类文件具有错误的版本 61.0, 应为 52.0

Error:(3, 47) java: 无法访问org.springframework.web.bind.annotation.RequestMapping
错误的类文件: D:\ProgramFiles\maven\repository1\org\springframework\spring-web\6.2.7\spring-web-6.2.7.jar(org/springframework/web/bind/annotation/RequestMapping.class)
类文件具有错误的版本 61.0, 应为 52.0
请删除该文件或确保该文件位于正确的类路径子目录中。

 

 

这是因为springboot 3.0以上要求jdk为17以上,要解决这个问题要么把springboot的版本降低,要么提升jdk的版本。

我是把springboot版本改为2.7.18解决的

 

posted @ 2025-06-01 11:04  安然66  阅读(451)  评论(0)    收藏  举报