SpringCloud项目启动提示Singleton bean creation not allowed while singletons of this factory are in destruc

启动日志错误信息如下:

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!)

继续向上查看日志,发现日志中有以下内容:

Caused by: java.net.BindException: Address already in use: bind

原因很明显,服务端口被占用了!

解决方法:
方法1、将服务端口修改为未被使用的端口

方法2:参照 ------解决端口被占用问题------ 这篇文章,终止占用端口的进程,释放端口既可。
SpringCloud项目启动提示Singleton bean creation not allowed while singletons of this factory are in destruc_第1张图片

你可能感兴趣的:(Error/Exception)