1.Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.报错解决办法
在IDEA中运行程序后,出现上面的报错。在debug框里一直往下滑,找到discription和action的指示,可以看到提示的错误其实是8080端口被占用。
Description:
Web server failed to start. Port 8080 was already in use.
Action:
Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.
解决办法:
别急!只要把8080端口释放掉就可以了!具体操作办法是:
打开黑窗口(windos+r)一步一步输入下面三条指令
netstat -ano|findstr 被占用端口号 eg:netstat -ano|findstr 8080
taskkill /t /f /im 被占用端口号对应的TCP号 eg:taskkill /t /f /im “5050”
taskkill /f /t /im 对应的进程 eg:taskkill /f /t /im QQ.exe
如果显示无权释放端口的话,试一试用管理员权限打开cmd!