- 1. 问题所示
- 2. 问题分析
- 3. 解决方法
- 3.1 关闭进程
- 3.2 修改端口
出现如下问题:
*************************** APPLICATION FAILED TO START *************************** 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. Process finished with exit code 1
截图如下:
通过查看相关错误日志,发现是端口被占用了
一种是清除8080被占用的端口,另一种解决方案是换一个端口(也可不用8080端口)
知道了解决方案之后就很好解决方法
具体解决方法如下
关闭进程或者修改端口号两种方法
3.1 关闭进程通过netstat 8080,查看是否有进程在使用这个端口(但是列表中的内容比较多,不好查看比较)
精确查询应该配合findstr(注意命令应和linux区分开来,这是windows版本)
完整命令如下:netstat -ano | findstr 8080
杀死该进程即可:taskkill /F /PID 26868
重启服务即可成功
既然端口号被占用,那就换一种思路,修改8080端口为你想要的(不占用其他端口)
操作如下:
增加内容如下:server.port= 8085
重启服务即可成功
额外补充:如果重启之后网页打开如下:
可看我之前的文章:
springboot出现Whitelabel Error Page This application has no explicit mapping for /error解决方案



