Annotation Interface EnableConfigurationBeanBindings


@Target({TYPE,ANNOTATION_TYPE}) @Retention(RUNTIME) @Documented @Import(ConfigurationBeanBindingsRegister.class) public @interface EnableConfigurationBeanBindings
A container annotation that holds multiple EnableConfigurationBeanBinding annotations. It is used to apply several configuration bean bindings at once.

Example Usage

Basic Usage


 @EnableConfigurationBeanBindings(value = {
     @EnableConfigurationBeanBinding(name = "myBean1", value = MyBean1.class),
     @EnableConfigurationBeanBinding(name = "myBean2", value = MyBean2.class)
 })
 public class MyConfiguration {
 }
 

Java 8+ @Repeatable Usage


 @EnableConfigurationBeanBinding(name = "myBean1", value = MyBean1.class)
 @EnableConfigurationBeanBinding(name = "myBean2", value = MyBean2.class)
 public class MyConfiguration {
 }
 </pre

 

The above example will register two configuration beans with names "myBean1" and "myBean2" bound to their respective classes.

Since:
1.0.0
Author:
Mercy