Spring boot spring-boot:run in eclipse does not kill background java process

谁说胖子不能爱 提交于 2021-02-10 14:21:13

问题


I am running a spring boot web application through eclipse.

In eclipse, I have configured spring-boot:run maven goal. When run, the server starts up properly within the eclipse and I can invoke myactions.

When I want to stop the server, I just stop it by clicking on RED icon in Console window. The process seems to be stopped but server runs in the background and the java process can be seen as active in TaskManager.

Any idea, what could have been wrong ? Why the background process in not terminating ?


回答1:


The Red Icon in Console window will just do a hard stop.

To enable graceful shutdown, install Spring Tools and run the app as a Spring boot App & enable the check Enable Life Cycle Management

This way, the application would gracefully shutdown when you stop from the console window



来源:https://stackoverflow.com/questions/49643234/spring-boot-spring-bootrun-in-eclipse-does-not-kill-background-java-process

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!