問題描述:
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:關掉占用8080端口的進程
- 鍵盤輸入(win+r),接着在運行對話框中輸入“cmd”,進入命令窗口
- 輸入netstat -ano|findstr "8080",回車,如下圖顯示:

3.接着輸入tasklist|findstr "3516",回車得到占用8080端口的進程

4.打開“任務管理器”,定位改進程,然后結束進程,8080端口占用被取消

或者使用命令關閉:taskkill -PID 3516 -F
方法二:修改配置文件,使用其他的可用端口
我們可以修改application.yml配置文件中port端口號,如下圖:

