spring-framework / org.springframework.context.annotation / AnnotationBeanNameGenerator / <init>

<init>

AnnotationBeanNameGenerator()

org.springframework.beans.factory.support.BeanNameGenerator implementation for bean classes annotated with the org.springframework.stereotype.Component annotation or with another annotation that is itself annotated with org.springframework.stereotype.Component as a meta-annotation. For example, Spring's stereotype annotations (such as org.springframework.stereotype.Repository) are themselves annotated with org.springframework.stereotype.Component.

Also supports Java EE 6's javax.annotation.ManagedBean and JSR-330's javax.inject.Named annotations, if available. Note that Spring component annotations always override such standard annotations.

If the annotation's value doesn't indicate a bean name, an appropriate name will be built based on the short name of the class (with the first letter lower-cased). For example:

com.xyz.FooServiceImpl -> fooServiceImpl

Author
Juergen Hoeller

Author
Mark Fisher

Since
2.5

See Also
org.springframework.stereotype.Component#value()org.springframework.stereotype.Repository#value()org.springframework.stereotype.Service#value()org.springframework.stereotype.Controller#value()javax.inject.Named#value()