Windows下端口被占用的解决办法(Solution to port occupation under Windows)

背景:不需要重启,这种情况,一般是进程没有正常结束导致的,本次实验以 idea启动8081端口,在项目启动的过程中,因为安装了插件,提示restart ide,于是直接重启idea,再次启动项目就报8081端口被占用

解决办法:

netstat -aon|findstr "8081"
taskkill /f /pid 7432
————————

Background: there is no need to restart. This situation is usually caused by the process not ending normally. In this experiment, the 8081 port is started with idea. During the project startup, because the plug-in is installed, it prompts restart IDE, so restart idea directly, and restart the project again, it will report that the 8081 port is occupied

terms of settlement:

netstat -aon|findstr "8081"
taskkill /f /pid 7432