From a7889c9df475e6b6940bdde80e761fe2bf8de0b0 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Tue, 8 Jan 2013 11:30:22 +0100 Subject: [PATCH] Backport "Add 3.1 migration section to reference docs" Address error raised when using component-scan against the unqualified "org" base package. Issue: SPR-9843 Backport-Commit: b8f223c404db419927d4f9763d71e10ca38d37dd --- .../src/migration-3.1.xml | 33 +++++++++++++++++++ spring-framework-reference/src/new-in-3.1.xml | 3 +- .../src/spring-framework-reference.xml | 3 ++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 spring-framework-reference/src/migration-3.1.xml diff --git a/spring-framework-reference/src/migration-3.1.xml b/spring-framework-reference/src/migration-3.1.xml new file mode 100644 index 0000000000..196939a738 --- /dev/null +++ b/spring-framework-reference/src/migration-3.1.xml @@ -0,0 +1,33 @@ + + + + + Migrating to Spring Framework 3.1 + + In this appendix we discuss what users will want to know when upgrading to + Spring Framework 3.1. For a general overview of features, please see + + +
+ Component scanning against the "org" base package + Spring Framework 3.1 introduces a number of @Configuration + classes such as org.springframework.cache.annotation.ProxyCachingConfiguration + and + org.springframework.scheduling.annotation.ProxyAsyncConfiguration. + Because @Configuration is ultimately meta-annotated with Spring's + @Component annotation, these classes will inadvertently be scanned + and processed by the container for any component-scanning directive against the + unqualified "org" package, e.g.: + + <context:component-scan base-package="org"/> + Therefore, in order to avoid errors like the one reported in SPR-9843, + any such directives should be updated to at least one more level of qualification e.g.: + + <context:component-scan base-package="org.xyz"/> + Alternatively, an exclude-filter may be used. See + context:component-scan + documentation for details. +
+
diff --git a/spring-framework-reference/src/new-in-3.1.xml b/spring-framework-reference/src/new-in-3.1.xml index d5aeb22000..763ea85737 100644 --- a/spring-framework-reference/src/new-in-3.1.xml +++ b/spring-framework-reference/src/new-in-3.1.xml @@ -13,7 +13,8 @@ This is a list of new features for Spring 3.1. Most features do not yet have dedicated reference documentation but do have Javadoc. In such - cases, fully-qualified class names are given. + cases, fully-qualified class names are given. See also +
Cache Abstraction diff --git a/spring-framework-reference/src/spring-framework-reference.xml b/spring-framework-reference/src/spring-framework-reference.xml index 00086556fa..8017620319 100644 --- a/spring-framework-reference/src/spring-framework-reference.xml +++ b/spring-framework-reference/src/spring-framework-reference.xml @@ -497,6 +497,9 @@ + +