关于spring-cloud 的提供者服务启动报错解决办法。

在刚启动过程中,大概启动1秒左右就出现如下错误。 

s.c.a.CommonAnnotationBeanPostProcessor : Invocation of destroy method failed on bean with name 'scopedTarget.eurekaClient': org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'eurekaInstanceConfigBean': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)

以上错误是由于pom文件缺少spring-boot-starter-web依赖jar。

    <dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-web</artifactId>
</dependency>

增加以上jar 完美解决。

解决错误问题。一定先要看清楚问题,现在百度中有很多人,看见一堆报错就各种尝试。这种解决方法是很不可取的。首先看清楚问题错误是否一样。再尝试方法。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
对于启动报错的问题,根据您提供的引用内容,您可能需要检查以下几个方面来解决问题: 1. 首先,您需要确保您的pom.xml文件中已经正确引入了依赖项spring-cloud-starter-alicloud-oss。请检查您的pom.xml文件,确认是否有以下配置: ``` <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-starter-alicloud-oss</artifactId> </dependency> ``` 确保该依赖项的配置正确并且没有拼写错误。 2. 其次,您还需要检查您的版本信息是否匹配。根据引用中的信息,您可能需要确保您的版本信息如下: ``` spring boot: 2.6.6 spring cloud: 2021.0.1 spring cloud alibaba: 2021.0.1.0 aliyun-spring-boot-dependencies: 1.0.0 ``` 请检查您的版本信息并确认与您的依赖项配置一致。 3. 此外,根据引用和引用的信息,您还需要检查您是否在公共项目gulimall-common中引入了aliyun-oss-spring-boot-starter依赖项。请检查您的gulimall-common项目的pom.xml文件,确认是否有以下配置: ``` <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>aliyun-oss-spring-boot-starter</artifactId> </dependency> ``` 确保该依赖项的配置正确并且没有拼写错误。 综上所述,如果您的spring-cloud-starter-alicloud-oss启动报错,您可以检查pom.xml文件中的依赖项配置、版本信息以及公共项目中的依赖项配置,确保它们正确无误。希望这些信息对您有帮助。如果问题仍然存在,请参考阿里云官方文档或相关资源进行更深入的排查。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [【个人记录】阿里云OSS简化依赖[spring-cloud-starter-alicloud-oss]](https://blog.csdn.net/ykx____h/article/details/108918474)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* *3* [Spring Boot 项目导入 aliyun oss starter 依赖后启动报错的解决方案](https://blog.csdn.net/weixin_48084293/article/details/124075055)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值