org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'eurekaAutoServiceRegistration': 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!)
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
<p>同一个服务重复启了</p>
回复 <a class="referer" target="_blank">@Honey_Wang</a> : 端口号也不能一样的。
我现在单个服务只是测试,大概哪里重复使用了呢?
<p>端口占用问题。我启动的端口是8082,window一查才发现端口居然被QQ给占用了,我也是很无语。。</p>
兄嘚,十分感谢你的回答,解决了我的大问题,qq的tim程序占用了端口,十分感谢
<p>你有找到问题吗?我的总在服务关闭时出现:</p>
org.springframework.context.annotation.AnnotationConfigApplicationContext [994] - Exception thrown from ApplicationListener handling ContextClosedEvent
org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'eurekaAutoServiceRegistration': 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!)
兄弟,解决了没,咋解决的
<p>打包的时候不启动test的就行了,在pom.xml 文件下的properties 下加入 </p>
<properties>
<skipTests>true</skipTests>
<p>我的原因是: 用到了 feign, 要加 spring-boot-starter-web 依赖, 编译不报错 启动报错</p>