idea报错:Web server failed to start. Port 8089 was already in use.
问题分析:8089端口占用
原因一:IDEA退出时,SpringBoot程序没关闭;
原因二:IDEA未安全退出。
解决:找到端口号的PID,并KILL掉。
STEP1:找到端口PID
netstat -ano | findstr “端口号”
STEP2:KILL进程
taskkill /pid 145144 -t -f

更好的解决方式:
配置里更改
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<br> <!--解决 idea 退 springboot 没有退出-->
<fork>false</fork>
<!-- spring-boot:run 中文乱码解决 -->
<jvmArguments>-Dfile.encoding=UTF-8</jvmArguments><br>
</configuration>
</plugin>
不要为了追逐,而忘记当初的样子。

浙公网安备 33010602011771号