微服务启动出现错误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

解决

  1. 这个问题单纯从错误上看,可能会被引导到认为是哪个引入有问题,从而去寻找具体的一个问题去解决

  2. 实际上是boot项目的pom依赖对应包的<scope>有关

方法一

  1. 如果仅仅是一个依赖的启动有问题,例如java.servlet:解决如下:将范围从provided—>compile

    在这里插入图片描述
    在这里插入图片描述

    1. 若是报多个错误的话,建议如下修改

      1.右上角启动小三角 -->Edit configuration–>-右侧Modify options----> 找到带有“provided”字样的选项打勾 --> 重新启动工程运行即可。
      在这里插入图片描述
      在这里插入图片描述

总结:出现这个问题,很大程度上都是maven工程依赖的问题,可以围绕依赖从多方面修改引入,当然如果你的项目pom本身就没有引入相关依赖,那肯定是不行的!!需要先引入对应依赖

  • 9
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
和都提到了相同的异常信息:org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process***eureka.EurekaApplication]。该异常通常表示在处理导入的候选配置类时发生错误。 而提到了另一个异常信息:org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.alicp.jetcache.autoconfigure.JetCacheAutoConfiguration]。该异常表示在处理JetCacheAutoConfiguration配置类的导入候选时发生错误。 这些异常通常发生在Spring的配置文件中,表明在处理配置类的导入时出现了问题。该问题可能有多种原因,如类文件缺失、依赖冲突等。解决这种异常通常需要检查导入的配置类和依赖项是否正确,并确保它们都能正确加载和处理。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [【解决】Failed to process import candidates for configuration class ...](https://blog.csdn.net/weixin_38911545/article/details/120905291)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [jetcache配置注入不成功BeanDefinitionStoreException: Failed to process import candidates for ...](https://blog.csdn.net/weixin_46119595/article/details/116133947)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值