Browse Source

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
pull/175/head
Chris Beams 12 years ago
parent
commit
0bd4dab4e3
  1. 5
      src/test/java/org/springframework/context/annotation/ltw/ComponentScanningWithLTWTests.xml

5
src/test/java/org/springframework/context/annotation/ltw/ComponentScanningWithLTWTests.xml

@ -8,7 +8,10 @@ @@ -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"/>

Loading…
Cancel
Save