public abstract @interface

Configuration

implements Annotation
org.springframework.context.annotation.Configuration

Class Overview

Indicates that a class declares one or more Bean methods and may be processed by the Spring container to generate bean definitions and service requests for those beans at runtime.

Configuration is meta-annotated as a Component, therefore Configuration classes are candidates for component-scanning and may also take advantage of Autowired at the field and method but not at the constructor level. Externalized values may be wired into Configuration classes using the Value annotation.

May be used in conjunction with the Lazy annotation to indicate that all Bean methods declared within this class are by default lazily initialized.

Constraints

  • Configuration classes must be non-final
  • Configuration classes must be non-local (may not be declared within a method)
  • Configuration classes must have a default/no-arg constructor and may not use Autowired constructor parameters

Summary

[Expand]
Inherited Methods
From interface java.lang.annotation.Annotation