I need to gracefully start and shutdown the spring boot application using a script . Is there any other way to do it except using an actuator module in the application. Currently i have to stop the spring boot process manually in the task manager.
Ultimately the spring boot application spins off a java process which needs to be killed. At present you are killing it manually.
You have a few options:
SpringApplication.exit(ApplicationContext, ExitCodeGenerator...) method.System.exit(0)SpringApplication.run gives you ApplicationContext which you can close.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With