java: 无法访问org.springframework.web.bind.annotation.GetMapping
错误的类文件: /C:/WorkSoft/apache-maven-3.6.1/repository/org/springframework/spring-web/6.0.13/spring-web-6.0.13.jar!/org/springframework/web/bind/annotation/GetMapping.class
类文件具有错误的版本 61.0, 应为 52.0
请删除该文件或确保该文件位于正确的类路径子目录中
解决方案:
在pom.xml中降低springframework.boot的版本,将3.x.x版本改为2.x.x。例如:
原文地址:https://blog.csdn.net/qq_44805645/article/details/134043391