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 77807781 78807900 79998000 80998100 81998200 82998300 839950000 50059
方法:
1、换个端口(不在系统保留端口的范围)
2、关闭hyper-v
参考:
https://developer.aliyun.com/article/977707
https://www.jianshu.com/p/5ad2c9f0c969