Annotation Interface EachBean

@Documented @Retention(RUNTIME) @Target({METHOD,TYPE}) @Singleton public @interface EachBean

This annotation allows driving the production of Bean definitions from presence of other bean definitions. Typically used in conjunction with EachProperty

For example:

   public class ExampleConfiguration {

In the above example a new ExampleConfiguration bean will be created for each item under the key in application configuration

One can then drive the configuration of other beans with the same annotation:

   public class ExampleBean {
      ExampleBean(ExampleConfiguration config) {
EachBean requires that the parent bean has a Named qualifier, since the qualifier is inherited by each bean created by EachBean.
Graeme Rocher
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
  • Element Details

    • value

      Class<?> value
      The bean type that this bean is driven by