Solve the port occupation problem on Windows

During development, we always encounter port occupation problems, which ultimately leads to the failure of our projects or services to start normally.

Insert image description here

The solution is as follows:

# 1.根据端口号查进程 例如8082端口
netstat -aon | findstr :8082   

# 2.根据进程id查应用名
tasklist|findstr "11376"  

# 3.根据pid删除进程
taskkill /f /pid 9064   

Guess you like

Origin blog.csdn.net/qq_46921028/article/details/131732769