spring 项目 本地正常,打入docker容器就抛出bean找不到的错误

错误信息如下:

Error creating bean with name 'messageServiceImpl': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.qianxiao.blogwebscoket.service.impl.MessageServiceImpl] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@41cf53f9]

  两者环境却别是本地开发为

java version "1.8.0_281"
Java(TM) SE Runtime Environment (build 1.8.0_281-b09)
Java HotSpot(TM) Client VM (build 25.281-b09, mixed mode, sharing)

  docker容器环境

openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2~bpo8+1-b14)
OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)

  看这版本貌似没什么问题

但是我 在 MessageServiceImpl 类上面 加上 @Service 注解 运行时就报错

去除@Service 注解就启动正常

找了很久的问题;最后问题出在 这个实现类里面有 使用 CallBack 回调参数,把这个参数 去除 编译 再启动就正常!!!

posted @ 2021-02-06 18:50  浅笑19  阅读(610)  评论(0编辑  收藏  举报