Bird
0
0

If you forget to include 'health' in management.endpoints.web.exposure.include, what will happen when you try to access /health?

medium📝 Debug Q6 of 15
Spring Boot - Actuator
If you forget to include 'health' in management.endpoints.web.exposure.include, what will happen when you try to access /health?
AYou will get a 403 Forbidden error
BThe health status will be displayed normally
CThe application will crash
DYou will get a 404 Not Found error
Step-by-Step Solution
Solution:
  1. Step 1: Understand endpoint exposure control

    Endpoints not included in exposure list are not accessible over HTTP.
  2. Step 2: Predict behavior for missing 'health' exposure

    Accessing /health will return 404 Not Found because it is not exposed.
  3. Final Answer:

    You will get a 404 Not Found error -> Option D
  4. Quick Check:

    Missing exposure causes 404 on endpoint access [OK]
Quick Trick: Missing exposure means 404 error on access [OK]
Common Mistakes:
  • Expecting default exposure
  • Thinking it causes crash
  • Confusing 404 with 403 errors

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes