前言
IDEA 突然崩溃后重启项目,报错
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-09-30 16:10:15.312 ERROR 2712 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Web server failed to start. Port 8091 was already in use.
Action:
Identify and stop the process that's listening on port 8091 or configure this application to listen on another port.
Process finished with exit code 1
原因
其中这句话写的很清楚,端口被占用,因为着急启动,选择换了个端口
Web server failed to start. Port 8091 was already in use.
解决
这里解决的是关闭之前的端口,因为还想用
访问我以前接口还是可以访问通,但是idea没有这个项目
通过CMD的命令窗口 netstat -a -n
可以清楚的看到已运行的端口
如何关闭这个进程?
使用命令netstat -nao | findstr 8091
看到PID后执行
taskkill /pid 7960 /F
复查端口,发现已经关闭