In Spring Boot, the _____ annotation is used to conditionally enable a configuration based on the presence of a specific property.
- @ComponentScan
- @ConditionalOnProperty
- @ConfigurationProperties
- @EnableAutoConfiguration
In Spring Boot, the "@ConditionalOnProperty" annotation is used to conditionally enable a configuration based on the presence of a specific property. This annotation allows you to configure components or beans based on the values of properties, making it a powerful tool for conditional configuration in your application.
Loading...
Related Quiz
- Which annotation is used in Spring Boot to conditionally enable or disable certain parts of auto-configuration based on the presence of specific properties?
- To create a simple unit test in Spring Boot, you can use the _____ annotation to load a minimal test context.
- What is the primary goal of performance tuning in a Spring Boot application?
- In a Spring Boot application, the _____ annotation is used to demarcate transaction boundaries.
- Which of the following annotations is specifically used for injecting dependencies on setter methods?