Identify and stop the process that listening on port 80 or configure this application to listen on

下面我们来说说怎么解决端口被占用的问题:

方法一:杀死进程

1.windows+r打开windows窗口,输入cmd
2.输入netstat -ano
Identify and stop the process that listening on port 80 or configure this application to listen on_第1张图片
3.找到端口,记住pid
Identify and stop the process that listening on port 80 or configure this application to listen on_第2张图片
4.输入taskkill /pid 7528 -f 杀掉端口
Identify and stop the process that listening on port 80 or configure this application to listen on_第3张图片

方法2:修改端口号

1.打开application.yml文件(或者application.properties),修改端口号为8081

Identify and stop the process that listening on port 80 or configure this application to listen on_第4张图片

2.然后浏览器输入的时候就得用8081端口号了

比如:http://localhost:8081/xxx

你可能感兴趣的:(异常处理,java,spring,cmd,eclipse)