Filter @Configuration classes out of LTW test

Moving @EnableMBeanExport and its MBeanExportConfiguration
@Configuration class into context.annotation caused a side effect with
ComponentScanningWithLTWTests, which component scans context.annotation
in order to test LTW behavior. Picking up MBeanExportConfiguration
without proper MBean configuration resulted in a NullPointerException
during test execution.

This commit simply filters out all @Configuration classes from the LTW
test's component-scanning directive.

Issue: SPR-8943
This commit is contained in:
Chris Beams
2012-10-26 15:47:11 +02:00
parent 5d4d1eaca4
commit 0bd4dab4e3

View File

@@ -8,7 +8,10 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"
default-autowire="byType">
<context:component-scan base-package="org.springframework.context.annotation"/>
<context:component-scan base-package="org.springframework.context.annotation">
<context:exclude-filter type="annotation"
expression="org.springframework.context.annotation.Configuration"/>
</context:component-scan>
<context:load-time-weaver aspectj-weaving="off"/>