问题概述
在项目中使用 Spring Boot + Spring Cloud 进行开发的,在集成Eureka注册中心时报错,项目启动不起来,“ 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!) ”
如下图:

具体信息如下:
org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'eurekaAutoServiceRegistration': Singlet
在Spring Boot和Spring Cloud项目中,集成Eureka时遇到'Error creating bean with name 'eurekaAutoServiceRegistration': Singleton bean creation not allowed...'错误。原因是服务实例名称或端口冲突。解决方案包括确保各实例端口不同和服务名唯一,避免在Eureka注册时冲突。通过调整配置,成功启动项目。
订阅专栏 解锁全文
3399





