From 7c34dd87c191dedf80c9f7d2274e1b7360f08abe Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Thu, 12 May 2016 13:55:13 +0900 Subject: [PATCH] Polish Closes gh-5925 --- .../src/main/asciidoc/spring-boot-features.adoc | 6 +++--- ...=> RedisStarterDeprecationWarningAutoConfiguration.java} | 4 ++-- .../autoconfigure/restdocs/ContentContainingCondition.java | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) rename spring-boot-starters/spring-boot-starter-redis/src/main/java/org/springframework/boot/starter/redis/{RedisStarterDepricationWarningAutoConfiguration.java => RedisStarterDeprecationWarningAutoConfiguration.java} (91%) diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index dcaa48643e..8198266b44 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -4900,9 +4900,9 @@ database you can use the `@AutoConfigureTestDatabase` annotation: [[boot-features-testing-spring-boot-applications-testing-autoconfigured-rest-docs]] ==== Auto-configured Spring REST Docs tests -Test `@AutoConfigureRestDocs` annotation can be used if you want to use Spring REST Docs +`@AutoConfigureRestDocs` annotation can be used if you want to use Spring REST Docs in your tests. It will automatically configure `MockMvc` to use Spring REST Docs and -removes the need for Spring REST Docs' JUnit rule. +remove the need for Spring REST Docs' JUnit rule. [source,java,indent=0] ---- @@ -4964,7 +4964,7 @@ automatically generate the default snippets: [source,java,indent=0] ---- @TestConfiguration - static class ResultHandlerConfiguration{ + static class ResultHandlerConfiguration { @Bean public RestDocumentationResultHandler restDocumentation() { diff --git a/spring-boot-starters/spring-boot-starter-redis/src/main/java/org/springframework/boot/starter/redis/RedisStarterDepricationWarningAutoConfiguration.java b/spring-boot-starters/spring-boot-starter-redis/src/main/java/org/springframework/boot/starter/redis/RedisStarterDeprecationWarningAutoConfiguration.java similarity index 91% rename from spring-boot-starters/spring-boot-starter-redis/src/main/java/org/springframework/boot/starter/redis/RedisStarterDepricationWarningAutoConfiguration.java rename to spring-boot-starters/spring-boot-starter-redis/src/main/java/org/springframework/boot/starter/redis/RedisStarterDeprecationWarningAutoConfiguration.java index 1fbd6cf31b..57b606cdbe 100644 --- a/spring-boot-starters/spring-boot-starter-redis/src/main/java/org/springframework/boot/starter/redis/RedisStarterDepricationWarningAutoConfiguration.java +++ b/spring-boot-starters/spring-boot-starter-redis/src/main/java/org/springframework/boot/starter/redis/RedisStarterDeprecationWarningAutoConfiguration.java @@ -33,10 +33,10 @@ import org.springframework.context.annotation.Configuration; */ @Configuration @Deprecated -public class RedisStarterDepricationWarningAutoConfiguration { +public class RedisStarterDeprecationWarningAutoConfiguration { private static final Log logger = LogFactory - .getLog(RedisStarterDepricationWarningAutoConfiguration.class); + .getLog(RedisStarterDeprecationWarningAutoConfiguration.class); @PostConstruct public void logWarning() { diff --git a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/ContentContainingCondition.java b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/ContentContainingCondition.java index 551b710fa5..9c8411f09d 100644 --- a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/ContentContainingCondition.java +++ b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/ContentContainingCondition.java @@ -45,8 +45,7 @@ class ContentContainingCondition extends Condition { Reader reader = null; try { reader = new FileReader(value); - String content = FileCopyUtils.copyToString(new FileReader(value)); - System.out.println(content); + String content = FileCopyUtils.copyToString(reader); return content.contains(this.toContain); } catch (IOException ex) {