In Spring Boot, to create a condition based on the presence or absence of a specific bean, the _____ annotation can be used.

  • @ConditionalOnBean
  • @ConditionalOnClass
  • @ConditionalOnMissingBean
  • @ConditionalOnProperty
In Spring Boot, the @ConditionalOnBean annotation is used to create a condition based on the presence or absence of a specific bean in the application context. This allows you to configure certain components or behavior only if a particular bean is defined, making it a powerful tool for conditional configuration.
Add your answer
Loading...

Leave a comment

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