diff --git a/spring-boot/src/main/java/org/springframework/boot/test/IntegrationTest.java b/spring-boot/src/main/java/org/springframework/boot/test/IntegrationTest.java index 12c0988cf9..4b55cb7cd5 100644 --- a/spring-boot/src/main/java/org/springframework/boot/test/IntegrationTest.java +++ b/spring-boot/src/main/java/org/springframework/boot/test/IntegrationTest.java @@ -25,6 +25,7 @@ import java.lang.annotation.Target; import org.springframework.core.env.Environment; import org.springframework.test.context.TestExecutionListeners; +import org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener; import org.springframework.test.context.support.DependencyInjectionTestExecutionListener; import org.springframework.test.context.support.DirtiesContextTestExecutionListener; import org.springframework.test.context.transaction.TransactionalTestExecutionListener; @@ -44,7 +45,7 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi @TestExecutionListeners(listeners = { IntegrationTestPropertiesListener.class, DependencyInjectionTestExecutionListener.class, DirtiesContextTestExecutionListener.class, - TransactionalTestExecutionListener.class }) + TransactionalTestExecutionListener.class, SqlScriptsTestExecutionListener.class }) public @interface IntegrationTest { /** diff --git a/spring-boot/src/main/java/org/springframework/boot/test/IntegrationTestPropertiesListener.java b/spring-boot/src/main/java/org/springframework/boot/test/IntegrationTestPropertiesListener.java index 24139510ce..b3cc56a283 100644 --- a/spring-boot/src/main/java/org/springframework/boot/test/IntegrationTestPropertiesListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/test/IntegrationTestPropertiesListener.java @@ -82,4 +82,5 @@ class IntegrationTestPropertiesListener extends AbstractTestExecutionListener { private void addIntegrationTestProperty(Set propertySourceProperties) { propertySourceProperties.add(IntegrationTest.class.getName() + "=true"); } + }