Spring Boot - ActuatorYou wrote a custom health indicator but the health endpoint does not show your custom status. What is a likely cause?AThe actuator dependency is missing from the projectBThe health() method returns Health.up() instead of Health.down()CThe application.properties file is missing management.endpoint.health.enabled=trueDThe custom health indicator class is not annotated with @Component or registered as a beanCheck Answer
Step-by-Step SolutionSolution:Step 1: Check bean registration for custom health indicatorWithout @Component or bean registration, Spring won't detect the class.Step 2: Understand impact on health endpointIf not registered, custom health status won't appear regardless of method return.Final Answer:Missing @Component or bean registration -> Option DQuick Check:Custom health indicator must be a Spring bean [OK]Quick Trick: Annotate custom health indicator with @Component to register [OK]Common Mistakes:Assuming method return value affects visibilityMissing actuator dependency causes no health endpoint at all
Master "Actuator" in Spring Boot9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallPerf
More Spring Boot Quizzes Advanced Patterns - Event publishing with ApplicationEventPublisher - Quiz 3easy Advanced Patterns - Custom auto-configuration - Quiz 7medium Advanced Patterns - Why enterprise patterns matter - Quiz 15hard Aspect-Oriented Programming - @Around advice for full control - Quiz 14medium Async Processing - Exception handling in async - Quiz 15hard Caching - Redis as cache provider - Quiz 14medium Docker and Deployment - Why containerization matters - Quiz 15hard Spring Boot Actuator - Actuator endpoints overview - Quiz 10hard Spring Boot Actuator - Metrics with Micrometer - Quiz 15hard Testing Spring Boot Applications - @SpringBootTest for integration tests - Quiz 12easy