微服务启动出现错误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”字样的选项打勾 --> 重新启动工程运行即可。


-
文章讲述了微服务启动时遇到的错误,指出问题可能源于SpringBoot项目的Maven依赖配置中的<scope>。解决方案包括检查并可能调整依赖范围,特别是将Provided类型改为Compile。问题通常与依赖管理有关,需确保项目已正确引入所需依赖。
862

被折叠的 条评论
为什么被折叠?



