某端口被占用的解决方法

运行springboot的项目,执行java -jar xxx.jar命令后,报8080端口在使用,通过如下方式关掉使用的8080端口。

  1. netstat -ano | findstr "8080"

  2. tasklist | findstr "3364"

  3. taskkill /f/t/im javaw.exe

如果想更改springboot的tomcat的启动端口号,在application.properties中设置server.port=自定义的端口号

参考链接:
解决问题 The Tomcat connector configured to listen on port 8080 failed to start.

原文地址:https://www.cnblogs.com/tellw/p/13519031.html