赞
踩
问题:
启动SpringBoot项目后发现启动失败,控制台输出以下内容
Description: The Tomcat connector configured to listen on port 8080 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 8080, or configure this application to listen on another port.’
打开命令窗口,输入netstat -ano| 8080,查看占用端口的进程的pid
Windows 下杀指定进程taskkill -F /pid xxxx
如果不想出现如上问题或者换了端口亦然被占用,下面的办法可以解决问题。
1、使用端口号:0 (随机端口)
2、添加依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。