Skip to content

Commit 54db738

Browse files
committed
Fix split package introduced by @EnableSpringConfigured
Commit 5327a7a moved @EnableSpringConfigured from beans.factory.aspectj => context.annotation within the spring-aspects module. This resolved a package cycle but had the side-effect of causing a "split package" [1] problem between spring-context and spring-aspects in OSGi-based classloader environments because the context.annotation package now exists in both modules. The simplest and best solution from an OSGi perspective is to relocate @EnableSpringConfigured and its supporting SpringConfiguredConfiguration class into a new package. This commit moves both these types into context.annotation.aspectj, following convention with other such "aspectj"-qualified packages in the spring-aspects module. As with the previous move, it is presumed this change will be low-impact as the "spring-configured" approach to domain object injection is a niche feature to begin with, and @EnableSpringConfigured has existed in its current location only since 3.1.2 and this change is being made in time for 3.1.3. [1]: http://wiki.osgi.org/wiki/Split_Packages Issue: SPR-9811, SPR-9441
1 parent cb86712 commit 54db738

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

spring-aspects/src/main/java/org/springframework/context/annotation/EnableSpringConfigured.java renamed to spring-aspects/src/main/java/org/springframework/context/annotation/aspectj/EnableSpringConfigured.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.context.annotation;
17+
package org.springframework.context.annotation.aspectj;
1818

1919
import java.lang.annotation.Documented;
2020
import java.lang.annotation.ElementType;

spring-aspects/src/main/java/org/springframework/context/annotation/SpringConfiguredConfiguration.java renamed to spring-aspects/src/main/java/org/springframework/context/annotation/aspectj/SpringConfiguredConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.context.annotation;
17+
package org.springframework.context.annotation.aspectj;
1818

1919
import org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect;
2020
import org.springframework.beans.factory.config.BeanDefinition;

spring-aspects/src/test/java/org/springframework/context/annotation/AnnotationBeanConfigurerTests.java renamed to spring-aspects/src/test/java/org/springframework/context/annotation/aspectj/AnnotationBeanConfigurerTests.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.context.annotation;
17+
package org.springframework.context.annotation.aspectj;
1818

1919
import org.springframework.beans.factory.aspectj.AbstractBeanConfigurerTests;
2020
import org.springframework.context.ConfigurableApplicationContext;
21+
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
22+
import org.springframework.context.annotation.Configuration;
23+
import org.springframework.context.annotation.ImportResource;
24+
import org.springframework.context.annotation.aspectj.EnableSpringConfigured;
2125

2226
/**
2327
* Tests that @EnableSpringConfigured properly registers an

0 commit comments

Comments
 (0)