端口号占用
运行springboot项目,出现端口号占用
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.
解决方法
1.杀死进程号
windows
netstat -ano|findstr 8888 --找到端口对应的进程号
taskkill -f -pid 进程号 --结束对应的进程号
linux
ps aux | grep java --查询java有关的进程
kill -9 进程号 --结束对应的进程号
2.修改端口号
修改配置文件application.yml,加上参数:server.port=8869 修改为不同的端口号重启即可