微服务启动出现错误Failed to process import candidates for configuration class [xxxxx]; nested exception is ja
·
微服务启动出现错误Failed to process import candidates for configuration class [xxxxx]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods
问题描述:微服务启动出现错误
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [xxxxx]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration
解决:
-
这个问题单纯从错误上看,可能会被引导到认为是哪个引入有问题,从而去寻找具体的一个问题去解决
-
实际上是boot项目的pom依赖对应包的
<scope>
有关
方法一:
-
如果仅仅是一个依赖的启动有问题,例如java.servlet:解决如下:将范围从provided—>compile
-
若是报多个错误的话,建议如下修改
1.右上角启动小三角 -->Edit configuration–>-右侧Modify options----> 找到带有“provided”字样的选项打勾 --> 重新启动工程运行即可。
-
总结:出现这个问题,很大程度上都是maven工程依赖的问题,可以围绕依赖从多方面修改引入,当然如果你的项目pom本身就没有引入相关依赖,那肯定是不行的!!需要先引入对应依赖!
更多推荐
所有评论(0)