Annotation Type Lazy


Marks a class or factory method bean to be initialized lazily.

When annotating a Factory class as @Lazy, the factory itself is not lazy but all beans that it provides will have lazy initialization.

If the annotated class or factory method is an interface or has an additional no-args constructor, a generated proxy bean will be wired for ultimate laziness.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Control whether a compile-time proxy is generated to support lazy initialization.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Determine the kind of lazy initialization.
  • Element Details

    • value

      Determine the kind of lazy initialization.
      Default:
      AUTO_PROXY