Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

checking whether spring boot application is running or not

I've created a spring boot project and deployed it on a vm. I've added a command in local.rc that starts the spring boot application on reboot. I want to check whether the command got executed and the application is running. How do I do that?

like image 871
Rohan RM Avatar asked Oct 24 '25 16:10

Rohan RM


1 Answers

There are two ways

  1. On system level - you can run your project as a service, which is documented in the Official documentation - Deployments. Then you can query the application status service myapp status.

  2. On application level - include Spring Boot Actuator in your app and use the Actuator endpoints such as /actuator/health as per Official documentation - Production Ready Endpoints. These endpoints can be exposed via HTTP or JMX.

Note: prior to spring boot 2.0 the actuator endpoint is /health

like image 139
Michal Avatar answered Oct 26 '25 05:10

Michal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!