Spring Boot spring-boot:在eclipse中运行不会杀死后台Java进程 [英] Spring boot spring-boot:run in eclipse does not kill background java process

查看:81
本文介绍了Spring Boot spring-boot:在eclipse中运行不会杀死后台Java进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过Eclipse运行Spring Boot Web应用程序.

I am running a spring boot web application through eclipse.

在Eclipse中,我已经配置了 spring-boot:run maven目标.运行时,服务器可以在Eclipse中正常启动,并且我可以调用myactions.

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.

当我要停止服务器时,只需在控制台窗口中单击红色图标即可停止服务器.该进程似乎已停止,但是服务器在后台运行,并且在TaskManager中可以将Java进程视为活动的.

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 ?

推荐答案

控制台"窗口中的红色图标"只会硬停.

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

要启用正常关机,请安装 Spring工具并以Spring Boot App&的形式运行该应用程序启用检查启用生命周期管理"

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

这篇关于Spring Boot spring-boot:在eclipse中运行不会杀死后台Java进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆