Terminating mvn spring-boot:run doesn't stop tomcat

后端 未结 18 1375
别那么骄傲
别那么骄傲 2020-12-04 07:11

I can successfully start spring-boot with mvn spring-boot, the documentation mentions to gracefully exit the application hit ctrl-c.



        
18条回答
  •  庸人自扰
    2020-12-04 07:50

    It still happens to me on version 1.1.9 running on windows 7.

    So after hitting Ctrl C. The fastest way to kill the background java will be .

    Find the java PID

         c:\>netstat -ano | find "8080"
         TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       1196
         TCP    [::]:8080              [::]:0                 LISTENING       1196
         c:\>taskkill /F /PID 1196
         SUCCESS: The process with PID 1196 has been terminated.
    

    I am assuming in the example above that you are running on http port 8080

    For Mac Users:

         $lsof -i :8080
         COMMAND   PID   USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
         java    SOME_PID user  417u  IPv6 0xa4b3be242c249a27      0t0  TCP *:name (LISTEN)
         kill -9 SOME_PID
    

提交回复
热议问题