To conditionally apply an auto-configuration based on the value of a configuration property, the _____ annotation is used in Spring Boot.

  • @Autowired
  • @ConditionalOnClass
  • @ConditionalOnConfiguration
  • @ConditionalOnProperty
In Spring Boot, the "@ConditionalOnProperty" annotation is used to conditionally apply an auto-configuration based on the value of a configuration property. This allows developers to customize the application's behavior depending on the configuration values, making it a powerful tool for managing application behavior in different environments or scenarios.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *