From 6635a5d96d2ca5ac247242e5c770e06279014128 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 14 Dec 2009 00:58:04 +0000 Subject: [PATCH] @ManagedBean coverage in javadoc --- .../context/annotation/AnnotationBeanNameGenerator.java | 4 +++- .../context/annotation/ClassPathBeanDefinitionScanner.java | 3 +++ .../ClassPathScanningCandidateComponentProvider.java | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java index a490c8ca2fa..bb80b3157cc 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java @@ -39,7 +39,9 @@ import org.springframework.util.StringUtils; * themselves annotated with * {@link org.springframework.stereotype.Component @Component}. * - *

Also supports JSR-330's {@link javax.inject.Named} annotation, if available. + *

Also supports Java EE 6's {@link javax.annotation.ManagedBean} and + * JSR-330's {@link 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 diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java index 0c4019d9728..da23b12a3e7 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java @@ -43,6 +43,9 @@ import org.springframework.util.PatternMatchUtils; * {@link org.springframework.stereotype.Service @Service}, or * {@link org.springframework.stereotype.Controller @Controller} stereotype. * + *

Also supports Java EE 6's {@link javax.annotation.ManagedBean} and + * JSR-330's {@link javax.inject.Named} annotations, if available. + * * @author Mark Fisher * @author Juergen Hoeller * @since 2.5 diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java index 380994a2fb8..f10cadb9cdd 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java @@ -160,10 +160,13 @@ public class ClassPathScanningCandidateComponentProvider implements ResourceLoad /** * Register the default filter for {@link Component @Component}. - * This will implicitly register all annotations that have the + *

This will implicitly register all annotations that have the * {@link Component @Component} meta-annotation including the * {@link Repository @Repository}, {@link Service @Service}, and * {@link Controller @Controller} stereotype annotations. + *

Also supports Java EE 6's {@link javax.annotation.ManagedBean} and + * JSR-330's {@link javax.inject.Named} annotations, if available. + * */ @SuppressWarnings("unchecked") protected void registerDefaultFilters() {