SpringCloud项目启动报错
启动日志错误信息如下:
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.杀掉占用该端口的进程(打开“ 运行 ”,输入 cmd 命令,输入下面命令!这里以占用 1099 端口号为例,通过第一条命令查出占用该端口号的PID即进程号是25568,紧接着执行第二条命令杀掉该进程。),重启即可