您的位置:首页 > 编程语言 > Java开发

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

2018-10-21 21:29 1056 查看

在刚启动过程中,大概启动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 完美解决。

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

 

阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐