windows系统关闭端口(比如8080)的2种方法

Windows下开发springboot出现8080端口重复使用情况:

Error starting ApplicationContext.To display the conditions report re-run your application with 'debug' enabled.
2022-08-10 11:21:51.051 ERROR 14816--- [           main]o.s.b.d.LoggingFailureAnalysisReporter  : 
 
***************************
APPLICATION FAILED TO START
***************************
 
Description:
 
Web server failed to start. Port8080 was already in use.
 
Action:
 
Identify and stop the process that'slistening on port 8080 or configure this application to listen on another port.
 
 
Process finished with exit code 1

打开cmd后,输入命令netstat -o -n -a | findstr :8080

显示所有的端口占用情况

-a 显示所有连接和监听端口

-n 以数字形式显示地址和端口号。 此选项一般与 -a选项组合使用

-o 显示与每个连接相关的所属进程 ID

 TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       7112
 TCP    192.168.1.6:53242      111.30.169.33:8080     ESTABLISHED     3320
 TCP    [::]:8080              [::]:0                 LISTENING       7112
 TCP   [2409:8a30:720:7640:3906:fb42:6035:6600]:49815  [2409:8c1e:8f60:1::2b]:8080  ESTABLISHED     3220

法一:直接终止 PID

taskkill /F /PID 7112

Pid

法二:根据PID找到运行的.exe,终止该程序

tasklist|findstr “16544”

taskkill /f /t im java.exe  (终止该程序)

也可以去任务管理器找到.exe终止

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值