Bird
0
0

What annotation is used to define a custom actuator endpoint in Spring Boot?

easy📝 Conceptual Q11 of 15
Spring Boot - Actuator
What annotation is used to define a custom actuator endpoint in Spring Boot?
A@Endpoint
B@Controller
C@Service
D@RestController
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of custom actuator endpoints

    Custom actuator endpoints allow you to add your own monitoring or info checks in Spring Boot.
  2. Step 2: Identify the correct annotation for defining custom endpoints

    The @Endpoint annotation is specifically designed to mark a class as a custom actuator endpoint.
  3. Final Answer:

    @Endpoint -> Option A
  4. Quick Check:

    Custom actuator endpoint = @Endpoint [OK]
Quick Trick: Custom actuator endpoints always use @Endpoint annotation [OK]
Common Mistakes:
  • Confusing @Endpoint with @Controller
  • Using @Service instead of @Endpoint
  • Using @RestController which is for REST APIs

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes