1 后台服务启动报错信息

2026-03-25 14:46:29.869  INFO 31348 --- [           main] com.sue.generate.Application             : Starting Application on DESKTOP-S4KI4LJ with PID 31348 (E:\code-generate\target\classes started by T470P in E:\code-generate)
2026-03-25 14:46:29.872  INFO 31348 --- [           main] com.sue.generate.Application             : The following profiles are active: dev
2026-03-25 14:46:29.922  INFO 31348 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@5efa40fe: startup date [Wed Mar 25 14:46:29 CST 2026]; root of context hierarchy
2026-03-25 14:46:31.013 ERROR 31348 --- [           main] o.s.boot.SpringApplication               : Application run failed

java.lang.IllegalStateException: Cannot load configuration class: com.sue.generate.Application

.core.ReflectUtils.defineClass(ReflectUtils.java:464) ~[spring-core-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:336) ~[spring-core-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.cglib.core

Caused by: org.springframework.cglib.core.CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @694abbdc
 

2 idea调整jdk编译版本

第一步:setting配置,如下图:

第二步:项目结构属性设置JDK

第三步:检查启动按钮的环境配置文件

Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐