欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 文旅 > 八卦 > 使用Spring和Springboot遇到的问题及解决办法

使用Spring和Springboot遇到的问题及解决办法

2025/5/15 3:20:28 来源:https://blog.csdn.net/m0_73556595/article/details/147733590  浏览:    关键词:使用Spring和Springboot遇到的问题及解决办法

1、提示是符号错误

错误描述:

You aren‘t using a compiler supported by lombok, so lombok will not work and has been disabled.

结解决办法:

提高lombok的版本

2、java:错误:不支持版本5

解决办法:

(1)Settings设置

Settings--Editor--File Encodings

Settings--搜索框,搜索maven

Settings--Build,Execution,Deployment--Compiler--Java Compiler--修改对应Moudule的Target bytecode version 版本(我的版本是jdk17)

(2)主配置文件pom.xml

在主配置文件pom.xml上面,加入如下代码

    <properties><maven.compiler.source>17</maven.compiler.source><maven.compiler.target>17</maven.compiler.target></properties>

(3)Project Structure设置

Project Structure--Project

Project Structure--Moudules--选择对应的模块--Socure/Dependencies

3、  Unsupported class file major version 61

错误提示:

nested exception is java. lang IllegalArgumentException: Unsupported class file major version 61

ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file

解决办法:

在主配置文件pom.xml中,加入如下代码

        <dependency><groupId>org.springframework</groupId><artifactId>spring-context</artifactId><version>5.3.15</version></dependency>

4、加入Services按钮

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词