In Spring Boot, the _____ annotation can be used to define which beans should be registered in the context based on a conditional check.

  • @ConditionalOnProperty
  • @ConditionalOnClass
  • @ConditionalOnBean
  • @Conditional
The "@ConditionalOnProperty" annotation in Spring Boot allows you to define conditions under which a bean should be registered in the application context. It checks the specified property and registers the bean if the condition is met. The other options, such as "@ConditionalOnClass," "@ConditionalOnBean," and "@Conditional," serve different conditional registration purposes based on different conditions or criteria.
Add your answer
Loading...

Leave a comment

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