Spring Boot Custom Actuators: Beginner's Guide
Explore the basics of creating custom actuators in Spring Boot applications.
Questions in this quiz
15 questions on Spring Boot Custom Actuators: Beginner's Guide. Work through them here, then start the quiz to answer them and see your score.
1.What is the primary purpose of an actuator in Spring Boot?
- ATo monitor and manage application health
- BTo compile Java code
- CTo manage database connections
- DTo handle HTTP requests
2.Which dependency is required to add Spring Boot Actuator to a project?
- Aspring-boot-starter-data-jpa
- Bspring-boot-starter-web
- Cspring-boot-starter-actuator
- Dspring-boot-starter-security
3.How do you enable a custom actuator endpoint in Spring Boot?
- ABy adding a new dependency
- BBy implementing the 'Endpoint' interface
- CBy creating a REST controller
- DBy using a configuration file
4.Which annotation is used to create a custom actuator endpoint in Spring Boot 2.x?
- A@Service
- B@RestController
- C@Endpoint
- D@Component
5.What method must be implemented when creating a custom actuator endpoint?
- AdoGet()
- BgetData()
- Cread()
- Dhandle()
6.Which HTTP method is commonly used to access actuator endpoints?
- AGET
- BPOST
- CPUT
- DDELETE
7.What is the default base path for actuator endpoints in Spring Boot?
- A/monitor
- B/admin
- C/actuator
- D/api
8.How can you customize the base path for actuator endpoints?
- ABy modifying application.properties
- BBy using a different IDE
- CBy changing the Java version
- DBy editing the pom.xml
9.Which property is used to enable all actuator endpoints?
- Amanagement.endpoints.web.exposure.include
- Bmanagement.endpoint.all
- Cmanagement.endpoints.enabled
- Dmanagement.actuator.enable
10.What is the purpose of the 'info' actuator endpoint?
- ATo display application information
- BTo handle security settings
- CTo manage user sessions
- DTo log errors
11.How do you expose a custom actuator endpoint in Spring Boot?
- ABy adding it to application.properties
- BBy implementing a REST service
- CBy creating a new Java class
- DBy using 'management.endpoints.web.exposure.include'
12.Which of the following is NOT a default actuator endpoint?
- Ashutdown
- Bmetrics
- Chealth
- Ddatabase
13.What is the purpose of the 'health' actuator endpoint?
- ATo check application health status
- BTo update application dependencies
- CTo manage application logs
- DTo configure security settings
14.How can you secure actuator endpoints?
- ABy modifying the pom.xml
- BBy using Spring Security
- CBy changing the Java version
- DBy using a different database
15.Which actuator endpoint provides metrics about the application?
- Abeans
- Benv
- Cmetrics
- Dinfo