程序开发中经常遇到端口号被占用,需要查看端口号并关闭

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-07-27 16:35:31 ERROR 1529 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :

***************************
APPLICATION FAILED TO START
***************************

Description:

Web server failed to start. Port 8080 was already in use.

Action:

Identify and stop the process that's listening on port 8080

查找的命令

netstat -ano |findstr 8080

关闭的命令

taskkill -PID 41272

windows 查看端口号占用并关闭_java