win10 springboot 端口占用问题

问题:

springboot 默认端口占用是8080,有时候启用端口产生端口占用的问题:

Identify and stop the process that's listening on port 8080 or configure this application to listen

解决方法

1、更换默认端口

如果8080端口被占用,我们可以更换默认端口,在application.properties里面,添加:

server.port = 8888

  

  

 

 2、解除端口占用

命令行窗口里面,执行

netstat -aon|findstr "8080"

得到端口号,然后执行

taskkill /pid 端口号 -f

 

posted @ 2021-06-01 10:49  r1-12king  阅读(169)  评论(0编辑  收藏  举报