java11模块化项目报错

Nonoas 2021-12-03 09:19:33

项目从java1.8迁移到Java11 时,报错如下,请问大佬们如何解决

 

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mainController': Unsatisfied dependency expressed through field 'odrService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'OrderServiceImpl' defined in file [D:\MyCode\IDEA\CRM-v200213\target\classes\indi\nonoas\crm\service\impl\OrderServiceImpl.class]: Initialization of bean failed; nested exception is org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class indi.nonoas.crm.service.impl.OrderServiceImpl: Common causes of this problem include using a final class or a non-visible class; nested exception is org.springframework.cglib.core.CodeGenerationException: java.lang.IllegalAccessError-->superinterface check failed: class indi.nonoas.crm.service.impl.OrderServiceImpl$$EnhancerBySpringCGLIB$$776d1e3b (in module CRM) cannot access class org.springframework.aop.framework.Advised (in unnamed module @0x19b6af5f) because module CRM does not read unnamed module @0x19b6af5f

 

...全文
366 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
=PNZ=BeijingL 2021-12-03
  • 打赏
  • 举报
回复

Error creating bean with name 'mainController
Error creating bean with name 'OrderServiceImpl'
Could not generate CGLIB subclass of class indi.nonoas.crm.service.impl.OrderServiceImpl
CRM does not read unnamed module


创建Bean=OrderServiceImpl 时出错 从你的日志看CRM 模块要读一个未命名的模块中的类,造成失败。模块化有问题,参考这篇文章能不能解决你的问题:https://www.it1352.com/1625573.html

Nonoas 2021-12-03
  • 举报
回复
@=PNZ=BeijingL 我这个主要是代理反射异常吧

51,412

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧