我尝试在调试模式{Intellij Idea}下运行我的Spring启动应用程序。当我第一次调试应用程序时,它工作正常。但是,在停止进程并再次运行应用程序时,出现此错误。
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
***************************
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 or configure this application to listen on another port.
> Task :bootRun FAILED
Execution failed for task ':bootRun'.
> Process '..\jdk11.0.16_9\bin\java.exe'' finished with non-zero exit value 1
问题是当我停止执行时,端口8080没有被释放。如果我尝试使用taskkill /pid <pid> /f
手动杀死进程,那么我可以重新运行应用程序,但是每次我想重新运行应用程序时,我都必须重复手动杀死端口8080上的前一个进程。有办法克服这个问题吗?
TIA!
1条答案
按热度按时间0qx6xfy61#
您可以执行
netsh winsock reset
并重新启动电脑。