今天在将服务注册进eureka中的时候出现一个问题
日志中的异常信息:
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!)
没有异常信息 但就是注册不进去
解决办法:添加一个spring-boot-starter-web依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>
即可解决