From 9938d1f4b6f31c8d41885c0ac38a82df16fc38ab Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 23 Aug 2018 10:27:25 +0200 Subject: [PATCH] Order IntegrationAutoConfiguration properly This commit makes sure that the auto-configuration for Spring Integration runs after the datasource has been auto-configured if necessary as there is an optional part that can initialize the jdbc schema. Closes gh-14175 --- .../integration/IntegrationAutoConfiguration.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java index a72c614a4d..14c2b88705 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java @@ -29,6 +29,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate; import org.springframework.boot.autoconfigure.condition.SearchStrategy; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.EnvironmentAware; @@ -60,7 +61,7 @@ import org.springframework.util.StringUtils; @Configuration @ConditionalOnClass(EnableIntegration.class) @EnableConfigurationProperties(IntegrationProperties.class) -@AutoConfigureAfter(JmxAutoConfiguration.class) +@AutoConfigureAfter({ DataSourceAutoConfiguration.class, JmxAutoConfiguration.class }) public class IntegrationAutoConfiguration { /**