运行项目时出现:Web server failed to start. Port 8888 was already in use.错误

在idea中运行项目时出现下面的错误信息:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-03-02 11:15:03.866 ERROR 10600 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   :

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

Description:

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

Action:

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

原因分析端口8888已被占用

解决方案杀死8888端口使用的进程

(1)以管理员的身份打开cmd:输入netstat -ano
查看启动的进程ID

在这里插入图片描述

(2)查看8888端口的Pid:
在这里插入图片描述
(3)杀死该进程的pid:task kill /F /pid PID
注意:PID是该进程的ID

在这里插入图片描述
重新启动项目,项目正常运行:

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Matcha_ice_cream/article/details/123227028