diff --git a/spring-integration-core/src/test/java/org/springframework/integration/configuration/EnableIntegrationTests.java b/spring-integration-core/src/test/java/org/springframework/integration/configuration/EnableIntegrationTests.java index 3990919ef4..e56b3b6fd7 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/configuration/EnableIntegrationTests.java +++ b/spring-integration-core/src/test/java/org/springframework/integration/configuration/EnableIntegrationTests.java @@ -53,6 +53,7 @@ import org.springframework.context.annotation.Condition; import org.springframework.context.annotation.ConditionContext; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.FilterType; import org.springframework.context.annotation.ImportResource; import org.springframework.context.annotation.Lazy; import org.springframework.context.expression.EnvironmentAccessor; @@ -814,7 +815,10 @@ public class EnableIntegrationTests { } @Configuration - @ComponentScan + @ComponentScan( + excludeFilters = @ComponentScan.Filter( + type = FilterType.ASSIGNABLE_TYPE, + classes = {ChildConfiguration.class, ContextConfiguration2.class})) @IntegrationComponentScan @EnableIntegration // INT-3853 diff --git a/spring-integration-core/src/test/java/org/springframework/integration/dsl/flows/IntegrationFlowTests.java b/spring-integration-core/src/test/java/org/springframework/integration/dsl/flows/IntegrationFlowTests.java index e0f4547e25..384c82ce5c 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/dsl/flows/IntegrationFlowTests.java +++ b/spring-integration-core/src/test/java/org/springframework/integration/dsl/flows/IntegrationFlowTests.java @@ -45,6 +45,7 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.FilterType; import org.springframework.context.annotation.Scope; import org.springframework.core.task.TaskExecutor; import org.springframework.integration.MessageDispatchingException; @@ -641,7 +642,16 @@ public class IntegrationFlowTests { } @Configuration - @ComponentScan + @ComponentScan( + excludeFilters = @ComponentScan.Filter( + type = FilterType.ASSIGNABLE_TYPE, + classes = { + ContextConfiguration.class, + ContextConfiguration3.class, + ContextConfiguration4.class, + InterceptorContextConfiguration.class, + SupplierContextConfiguration1.class, + SupplierContextConfiguration2.class})) public static class ContextConfiguration2 { @Autowired