在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
重新启动项目,项目正常运行: