January 2018
Intermediate to advanced
414 pages
10h 29m
English
Probably the most valuable endpoint is health, but the default indicators that it use may not be enough for our microservice. It's our responsibility to define custom indicators that will return the status of our microservices with accuracy and to consider what we really need to check so that we know the health of our microservice. We will create a health indicator that will check if our GreetingsService actually works.
Let's create a new class named GreetingsServiceHealthIndicator:
package com.microservices.chapter10import org.springframework.beans.factory.annotation.Autowiredimport org.springframework.boot.actuate.health.AbstractHealthIndicatorimport org.springframework.boot.actuate.health.Healthimport org.springframework.stereotype.Component ...Read now
Unlock full access