From bc157d5b4f31e016923bc6da3af79dd6bd7a71f6 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Wed, 15 Mar 2017 08:49:39 +0100 Subject: [PATCH 1/2] Polish See gh-8621 --- .../src/main/asciidoc/spring-boot-features.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 50b13c9e318..be517ab8e54 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -565,8 +565,8 @@ specified by the `spring.profiles.active` property are added after those configu the `SpringApplication` API and therefore take precedence. NOTE: If you have specified any files in `spring.config.location`, profile-specific -variants of those files will not be considered. Use directories in`spring.config.location` -if you also want to also use profile-specific properties. +variants of those files will not be considered. Use directories in +`spring.config.location` if you also want to also use profile-specific properties. @@ -3984,7 +3984,7 @@ NOTE: Since a cache library may offer both a native implementation and JSR-107 s Spring Boot will prefer the JSR-107 support so that the same features are available if you switch to a different JSR-107 implementation. -TIP: Spring Boot has a <>t. If +TIP: Spring Boot has a <>. If a single `HazelcastInstance` is available, it is automatically reused for the `CacheManager` as well unless the `spring.cache.jcache.config` property is specified. From cd8684499d410f357f3834f070562db25d1fb991 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Wed, 15 Mar 2017 08:57:24 +0100 Subject: [PATCH 2/2] Polish See gh-8621 --- .../NoSpringSecurityHealthMvcEndpointIntegrationTests.java | 4 ++-- .../NoSpringSecurityMvcEndpointSecurityInterceptorTests.java | 5 ----- .../src/main/asciidoc/appendix-executable-jar-format.adoc | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/NoSpringSecurityHealthMvcEndpointIntegrationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/NoSpringSecurityHealthMvcEndpointIntegrationTests.java index 1885a148397..ae0865daaba 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/NoSpringSecurityHealthMvcEndpointIntegrationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/NoSpringSecurityHealthMvcEndpointIntegrationTests.java @@ -68,7 +68,7 @@ public class NoSpringSecurityHealthMvcEndpointIntegrationTests { } @Test - public void healthWhenRightRoleNotPresentShouldExposeHealthDetails() + public void healthWhenRightRoleNotPresentShouldNotExposeHealthDetails() throws Exception { this.context = new AnnotationConfigWebApplicationContext(); this.context.setServletContext(new MockServletContext()); @@ -77,7 +77,7 @@ public class NoSpringSecurityHealthMvcEndpointIntegrationTests { MockMvc mockMvc = MockMvcBuilders.webAppContextSetup(this.context).build(); mockMvc.perform(get("/health").with(getRequestPostProcessor())) .andExpect(status().isOk()) - .andExpect(content().string(containsString("\"status\":\"UP\""))); + .andExpect(content().string("{\"status\":\"UP\"}")); } @Test diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/NoSpringSecurityMvcEndpointSecurityInterceptorTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/NoSpringSecurityMvcEndpointSecurityInterceptorTests.java index 65152658318..070d430da83 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/NoSpringSecurityMvcEndpointSecurityInterceptorTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/NoSpringSecurityMvcEndpointSecurityInterceptorTests.java @@ -23,14 +23,12 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import org.junit.Before; -import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.actuate.endpoint.AbstractEndpoint; import org.springframework.boot.junit.runner.classpath.ClassPathExclusions; import org.springframework.boot.junit.runner.classpath.ModifiedClassPathRunner; -import org.springframework.boot.test.rule.OutputCapture; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockServletContext; import org.springframework.web.method.HandlerMethod; @@ -47,9 +45,6 @@ import static org.mockito.Mockito.mock; @ClassPathExclusions("spring-security-*.jar") public class NoSpringSecurityMvcEndpointSecurityInterceptorTests { - @Rule - public OutputCapture output = new OutputCapture(); - private MvcEndpointSecurityInterceptor securityInterceptor; private TestMvcEndpoint mvcEndpoint; diff --git a/spring-boot-docs/src/main/asciidoc/appendix-executable-jar-format.adoc b/spring-boot-docs/src/main/asciidoc/appendix-executable-jar-format.adoc index 1a0732358d7..45fc7ba4184 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-executable-jar-format.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-executable-jar-format.adoc @@ -217,7 +217,7 @@ NOTE: `PropertiesLauncher` supports loading properties from |`loader.home` |Used to resolve relative paths in `loader.path`. E.g. `loader.path=lib` then `${loader.home}/lib` is a classpath location (along with all jar files in that - directory). Also used to locate a `loader.properties file`. Example `file:///opt/app` + directory). Also used to locate a `loader.properties` file. Example `file:///opt/app` (defaults to `${user.dir}`). |`loader.args`