Spring boot啓動異常 :To display the conditions report re-run your application with 'debug' enabled


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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章