Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-06-26 20:48:01.000 ERROR 15332 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
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.
多次启动项目出现此问题,百度了看了个各种博客有说是因为pom.xml 多导入了 spring-boot-devtools 依赖 和注解的一些问题
尝试将依赖注释 也没有解决(可以先尝试注释依赖)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<version>1.5.12.RELEASE</version>
</dependency>
后来看到一篇博客是说8080端口占用 之后尝试杀掉进程 就成功了 (重启电脑也可以)
解决:
1.打开cmd命令窗口 输入如下指令查看所有端口和PID
netstat -ano
2.找到对应的端口对应的PID 输入指令找到对应的进程
(2个命令都可以用)
tasklist | findstr "7676" 7676指端口对应的PID
taskkill /f /t /im pid pid指端口对应的PID
3.杀掉该进程 再次启动就OK啦
taskkill /f /t /im java.exe