Windows环境下,SpringBoot项目启动时报端口号占用:
***************************
APPLICATION FAILED TO START
***************************
Description:
Web server failed to start. Port 8080 was already in use.
Action:
Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.
于是换个端口号试试,还是提示占用。
通过netstat查看当前端口号并没有被占用啊,那可能是使用了系统保留端口,通过 netsh interface ipv4 show excludedportrange protocol=tcp
查看:
协议 tcp 端口排除范围
开始端口 结束端口
---------- --------
7681 7780
7781 7880
7900 7999
8000 8099
8100 8199
8200 8299
8300 8399
50000 50059
方法:
1、换个端口(不在系统保留端口的范围)
2、关闭hyper-v
参考: