最近做项目的时候又遇到很久以前遇到过的问题,知道该怎么解决但是又忘记具体语句是什么,写个博客方便翻阅
以下是报错内容
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端口正在使用
面对这种错误有两种解决办法(下面以8080端口为例)
方法一:kill 端口
1、window+R,输入cmd,回车启动
2、输入netstat -ano | findstr 8080 (如果是其他端口就改一下)
3、输入taskkill /pid 19112 /f (这个19112是对应上一条语句搜索出来的PID)
4、再次启动程序就成功了
方法二:换个端口
1、在项目中找到application.yml ,并将端口号换成其他端口即可