org.springframework.context.annotation
Annotation Type Configuration


@Target(value=TYPE)
@Retention(value=RUNTIME)
@Documented
@Component
public @interface Configuration

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

Since:
3.0
Author:
Rod Johnson, Chris Beams
See Also:
Bean, Lazy, Value, ConfigurationClassPostProcessor;