Web server failed to start. Port 8003 was already in use. Spring Boot

Web server failed to start. Port 8003 was already in use. Spring Boot

错误描述:

***************************
APPLICATION FAILED TO START
***************************

Description:

Web server failed to start. Port 8003 was already in use.

Action:

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

错误截图:

根据提示是端口被占用, 一般是修改配置文件(application.properties 或者 yml),这儿主要是想提供不修改配置的端口(因为修改的话意味着很多地方都要改) ,修改占用的程序:

win + r 打开程序控制台:

C:\Users\win>netstat -ano | findstr 8003
  TCP    127.0.0.1:8002         127.0.0.1:8003         ESTABLISHED     12048
  TCP    127.0.0.1:8003         127.0.0.1:8002         ESTABLISHED     12048

然后关闭占用端口的程序:

C:\Users\win>taskkill /F /PID 12048
成功: 已终止 PID 为 12048 的进程。
posted @ 2021-03-11 11:36  等不到的口琴  阅读(741)  评论(0编辑  收藏  举报