From ae4b8dc420f48f3f815f522b6b4aff749c2d67f0 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 1 Nov 2016 13:47:37 +0000 Subject: [PATCH] Ensure that CLI-based tests automatically import new TestRestTemplate See gh-6973 --- .../autoconfigure/SpringTestCompilerAutoConfiguration.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringTestCompilerAutoConfiguration.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringTestCompilerAutoConfiguration.java index e2716b2b39..672c55c111 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringTestCompilerAutoConfiguration.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringTestCompilerAutoConfiguration.java @@ -69,6 +69,7 @@ public class SpringTestCompilerAutoConfiguration extends CompilerAutoConfigurati "org.springframework.boot.test.web.client", "org.springframework.http", "org.springframework.test.context.junit4", "org.springframework.test.annotation").addImports( - "org.springframework.boot.test.context.SpringBootTest.WebEnvironment"); + "org.springframework.boot.test.context.SpringBootTest.WebEnvironment", + "org.springframework.boot.test.web.client.TestRestTemplate"); } }