在springboot項(xiàng)目啟動(dòng)時(shí)報(bào)如下錯(cuò)誤:
一、錯(cuò)誤原因:
To display the conditions report re-run your application with 'debug' enabled.
此行意思是,啟動(dòng)項(xiàng)目時(shí)出錯(cuò),如果想要詳細(xì)報(bào)告,需調(diào)試(debug)程序。此時(shí)我們找到“Description:”字樣查看錯(cuò)誤描述詳細(xì)信息:
錯(cuò)誤信息為:web器啟動(dòng)失敗,端口8080已被占用。
二、解決方案:
查看Action下面的內(nèi)容:?
Action: Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.
這里給出兩種解決方案:
1、更改此項(xiàng)目的端口號(hào):找到項(xiàng)目文件下的application.properties配置文件(有的項(xiàng)目以.yml或.yaml為后綴)
?
找到配置文件,若之前配置過,則直接修改port即可,若空白無任何配置,則輸server.port=XXX? ? XXX是自定義的端口號(hào),端口號(hào)默認(rèn)為8080,此處可以修改為8081或其他
此時(shí)重新啟動(dòng)項(xiàng)目即可
2、關(guān)閉占用端口的程序:
使用cmd命令查看端口號(hào)占用情況:netstat -ano | findstr 端口號(hào)
根據(jù)最后面的進(jìn)程號(hào)(PID:此處為9916)將占用此端口號(hào)的進(jìn)程關(guān)閉:
接著在cmd中輸入此命令:taskkill -PID 進(jìn)程號(hào) -F
或者打開任務(wù)管理器根據(jù)PID(9916)找到該進(jìn)程并手動(dòng)結(jié)束此進(jìn)程
文章來源:http://www.zghlxwxcb.cn/news/detail-739906.html
重新啟動(dòng)該項(xiàng)目即可正常運(yùn)行文章來源地址http://www.zghlxwxcb.cn/news/detail-739906.html
到了這里,關(guān)于啟動(dòng)springboot項(xiàng)目報(bào)錯(cuò):To display the conditions report re-run your application with ‘debug‘ enabled.的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!