啟動項目遇到以下問題:
Description:
Web server failed to start. Port 8080 was already in use.
Action:
Identify and stop the process that’s listening on port 8080 or configure this application to listen on another port.
Process finished with exit code 1
找到要啟動的項目的配置文件application.properties
,沒有的話可以在 resources
下手動創(chuàng)建。如圖添加端口號設置代碼,改一個不重復的端口號,啟動項目即可成功。此處要注意的是,Spring Boot 可以用不同類型的配置文件,其語法也不相同,詳情請參考【Spring Boot】Spring Boot 配置文件詳解(application.yml、application-dev.yml、application-test.yml )。
# 應用服務 WEB 訪問端口
server.port=8081
最后運行成功!文章來源:http://www.zghlxwxcb.cn/news/detail-783311.html
持續(xù)更新ing,動動小手,點點關注,后續(xù)更精彩!文章來源地址http://www.zghlxwxcb.cn/news/detail-783311.html
到了這里,關于【Spring Boot】項目端口號沖突解決方法,一步到位的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!