Web server failed to start. Port 8080 was already in use.(springboot解决8080端口被占用的方法)

问题描述:

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端口的进程

  1. 键盘输入(win+r),接着在运行对话框中输入“cmd”,进入命令窗口
  2. 输入netstat -ano|findstr "8080",回车,如下图显示:

        Web server failed to start. Port 8080 was already in use.(springboot解决8080端口被占用的方法)_第1张图片

    3.接着输入tasklist|findstr "3516",回车得到占用8080端口的进程

        

 

    4.打开“任务管理器”,定位改进程,然后结束进程,8080端口占用被取消

 

     Web server failed to start. Port 8080 was already in use.(springboot解决8080端口被占用的方法)_第2张图片

 

方法二:修改配置文件,使用其他的可用端口

我们可以修改application.yml配置文件中port端口号,如下图:

Web server failed to start. Port 8080 was already in use.(springboot解决8080端口被占用的方法)_第3张图片

 

 

你可能感兴趣的:(Spring,Boot,java)