0
0
Spring Bootframework~10 mins

Actuator endpoints overview in Spring Boot - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to enable the basic health endpoint in Spring Boot Actuator.

Spring Boot
management.endpoints.web.exposure.include=[1]
Drag options to blanks, or click blank then click option'
Aenv
Bhealth
Cinfo
Dmetrics
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing an endpoint that does not show health status.
Using multiple endpoints instead of just one.
2fill in blank
medium

Complete the code to expose all actuator endpoints over HTTP.

Spring Boot
management.endpoints.web.exposure.include=[1]
Drag options to blanks, or click blank then click option'
A*
Bmetrics,env
Chealth,info
Dhealth,metrics
Attempts:
3 left
💡 Hint
Common Mistakes
Listing endpoints manually instead of using the wildcard.
Using invalid characters instead of the wildcard.
3fill in blank
hard

Fix the error in the property to enable the metrics endpoint.

Spring Boot
management.endpoints.web.exposure.include=[1]
Drag options to blanks, or click blank then click option'
Ametricks
Bmetric
Cmetrics
Dmetrix
Attempts:
3 left
💡 Hint
Common Mistakes
Misspelling the endpoint name.
Using singular form instead of plural.
4fill in blank
hard

Fill both blanks to configure the info and health endpoints exposure.

Spring Boot
management.endpoints.web.exposure.include=[1],[2]
Drag options to blanks, or click blank then click option'
Ainfo
Bhealth
Cmetrics
Denv
Attempts:
3 left
💡 Hint
Common Mistakes
Using endpoints not related to info or health.
Swapping the order of endpoints.
5fill in blank
hard

Fill all three blanks to create a custom health indicator bean in Spring Boot.

Spring Boot
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.stereotype.Component;

@Component
public class CustomHealthIndicator implements [1] {

    @Override
    public [2] health() {
        return Health.[3]().build();
    }
}
Drag options to blanks, or click blank then click option'
AHealthIndicator
BHealth
Cup
DHealthCheck
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong interface name.
Returning wrong type from health method.
Using incorrect method to build health status.