From the course: Creating Spring Boot Microservices

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Solution: Add the Actuator dependency

Solution: Add the Actuator dependency - Spring Boot Tutorial

From the course: Creating Spring Boot Microservices

Solution: Add the Actuator dependency

(upbeat music) - [Instructor] Did you get it? I'll show you what we had to do. So select Spring Boot Actuator, and then go to EXPLORE, into the pom.xml, and let's find it, here's the dependency actuator, you just copy that and paste it. And here in the 02_05 branch, we see the dependency added spring-boot-starter-actuator. Let's compile and run that, make sure we are in the explorecali folder, clean and install to build that again. And run the jar, just wait for it to make sure that it's ready. Tomcat started. Go back to our other terminal, and now we're going to say curl localhost:8080/actuator/health. And it gives a status, UP. So Actuator is a very useful tool to basically do a health check to see that, okay, has this microservice, has it bootstrapped everything properly? Is it ready to go? 'Cause it might be running but maybe it's not bootstrapped properly. So everything is ready to go and it's ready to accept requests.

Contents