6

I'm using Spring for Dependency Injections. I want to "tell" my configuration that certain bean will be loaded only if some property is true.

When Spring is configured with annotations, this feature is possible by using the annotation @ConditionalOnProperty: Can we declare spring bean conditionally?

On the other hand, my Spring configurations are set by xmls. I would like to know what is the way to use conditional beans in xml.

CrazySynthax
  • 13,662
  • 34
  • 99
  • 183

0 Answers0