Springboot项目启动时端口被占用的问题及解决
目录javascript
- Springboot项目启动时端口被占用
- 解决办法
- 总结
Springboot项目启动时端口被占用
Springboot端口号默认8080,启动时经常会遇到端口号被占用的情况,报错信息如下:
Description:
Web server failed to start. Port 8080 javascriptwas already in use. Action: Ident编程客栈ify and stop the process that's listening on port 8080 or configure this application to listen on another port.Process finished with exit code 1
解决办法
- 1.打开CMD窗口
- 2.找到端口号
netstat -aon|findstr “8680”
- 3.找到对应程序
tasklist | frindstr 进程号
- 4.终止任务
taskkill /f /t /im Java.exe
- 5.再次查询端口,没有找到对应的端口号说明进行杀死成功
netstat -aon|findstrjs “8680”
- 6. 重新启动项目,可以正常启动
方法还有很多,也可以直接终止任务管理器对应的进程号
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持编程客栈(www.devze.com)。
精彩评论