0 環境
-
系統環境:window服務器 -
數據庫:sqlserver
1 殺死占用某個端口的進程
❝顯示端口被占用
❞
1.根據端口號查找對應的進程號
netstat -ano | findstr 8088 //find進程該端口(8088)是否被占用
2.通過進程號尋找進程名稱
tasklist | findstr 2000
從任務管理器中查找該程序,手動結束進程
或taskkill -PID <進程號> -F //強關指定進程

2 在pom.xml添加依賴
❝端口占用解決了 但還是閃退 網上說添加依賴 也是不行(有的時候是因為yml或者properties中配置時 多空格啥的等疏忽 可以先排查一下)
❞
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
3 清理maven
❝先
❞mvn clean -Dmaven.clean.skip=true
看看 我是mvn clean -Dmaven.clean.skip=true
才解決