SpringBoot启动报端口已被占用--解决

问题

启动SpringBoot项目后发现启动失败,控制台输出以下内容
Description: The Tomcat connector configured to listen on port 8100 failed to start. The port may already be in use or the connector may be misconfigured. Action: Verify the connector's configuration, identify and stop any process that's listening on port 8100, or configure this application to listen on another port.'
在这里插入图片描述
端口号已被占用

查找占用端口的进程

打开命令窗口,输入netstat -ano| 8100,查看占用端口的进程的pid
在这里插入图片描述
这里是3184,因此将进程杀死就可以了。

杀死进程

Windows 下杀指定进程taskkill -F /pid 3184
在这里插入图片描述
再次启动,运行成功。或者不用杀掉进程,替换这个端口也行!

原文地址:https://www.cnblogs.com/dataoblogs/p/14121831.html