JavaWeb 端口占用

1、错误描述

A.SpringBoot启动错误描述

  1. ***************************
  2. APPLICATION FAILED TO START
  3. ***************************
  4. Description:
  5. Web server failed to start. Port 8000 was already in use.
  6. Action:
  7. Identify and stop the process that's listening on port 8000 or configure this application to listen on another port.

2、解决办法

A.打开CMD命令行窗口

B.输入以下命令查找占用端口的PID

  1. netstat -aon|findstr "8080"

image.png

C.使用以下命令Kill此进程

  1. taskkill /f /pid 13884

image.png