问题描述:
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.
法一:关掉占用的端口。
1.键盘输入(win+r),接着在运行对话框中输入“cmd”,进入命令窗口
2.输入netstat -ano|findstr "8080",回车,
3.接着输入tasklist|findstr "3516",回车得到占用8080端口的进程
4.打开“任务管理器”,定位改进程,然后结束进程,8080端口占用被取消
或者使用命令关闭:taskkill -PID 3516 -F
法二:修改配置文件,使用其他的可用端口。
我们可以修改application.yml配置文件中port端口号
补充: Linux系统上查看端口、进程、结束进程
1. 查看端口占用: netstat -nap|grep 8080
2.查看端口占用的进程: ps -aux |grep 27672
3.结束进程: kill -9 pid
参考:https://blog.youkuaiyun.com/qinleilei7760631/article/details/123811734