Bird
0
0

Given the following configuration:

medium📝 component behavior Q4 of 15
Spring Boot - Actuator
Given the following configuration:
management.endpoints.web.exposure.include=health,metrics

What will be the result of accessing the /beans endpoint?
ARedirect to /health endpoint
BJSON list of all Spring beans
C404 Not Found error
D500 Internal Server Error
Step-by-Step Solution
Solution:
  1. Step 1: Understand endpoint exposure configuration

    Only /health and /metrics endpoints are exposed; others like /beans are not accessible.
  2. Step 2: Predict behavior when accessing non-exposed endpoint

    Accessing /beans will result in a 404 Not Found error because it is not exposed.
  3. Final Answer:

    404 Not Found error -> Option C
  4. Quick Check:

    Non-exposed endpoint access = 404 error [OK]
Quick Trick: Only exposed endpoints respond; others return 404 [OK]
Common Mistakes:
  • Expecting data from non-exposed endpoints
  • Confusing 404 with 500 errors
  • Assuming redirect happens automatically

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes