|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@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.
Autowired
constructor parameters
Import
,
Lazy
,
Bean
,
ConfigurationClassPostProcessor
,
AnnotationConfigApplicationContext
Optional Element Summary | |
---|---|
java.lang.String |
value
Explicitly specify the name of the Spring bean definition associated with this Configuration class. |
public abstract java.lang.String value
The custom name applies only if the Configuration class is picked up via
component scanning or supplied directly to a AnnotationConfigApplicationContext
.
If the Configuration class is registered as a traditional XML bean definition,
the name/id of the bean element will take precedence.
DefaultBeanNameGenerator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |