SpringBoot运行报错“The Tomcat connector configured to listen on port 80 failed to start.“

异常:

运行启动SpringBoot项目报错:

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2021-06-13 22:47:32.704 ERROR 79648 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 
 
***************************
APPLICATION FAILED TO START
***************************
 
Description:
 
The Tomcat connector configured to listen on port 80 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 80, or configure this application to listen on another port.

原因

80端口被占用了,如果是其他数字那么表示该端口被占用了,导致无法启动项目成功。

解决

第一种,修改端口号,不使用80端口,而使用其他端口号,比如使用81端口,修改springboot的配置文件application.yml即可
在这里插入图片描述
第二种,但我们一定要使用80端口怎么办,杀死占用了80端口的进程
打开DOS窗口,执行**netstat -aon|findstr 80**命令查看是什么占用了80端口,蓝色框内就是占用进程的ID号,记住
在这里插入图片描述
然后执行taskkill /pid 4 /f关闭这个进程,其中4就是上面的进程ID
在这里插入图片描述
再度查看就能发现关闭成功了
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值