From 1e2e8b1d669313f00a4c8154bccdd1e4dd8bdff4 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Tue, 20 Mar 2018 18:49:52 +0900 Subject: [PATCH] Rename expose to include Closes gh-12555 --- .../endpoint/ExposeExcludePropertyEndpointFilter.java | 4 ++-- .../endpoint/ExposeExcludePropertyEndpointFilterTests.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/ExposeExcludePropertyEndpointFilter.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/ExposeExcludePropertyEndpointFilter.java index 75ad0ac94c5..2c2ec8aadb4 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/ExposeExcludePropertyEndpointFilter.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/ExposeExcludePropertyEndpointFilter.java @@ -33,7 +33,7 @@ import org.springframework.core.env.Environment; import org.springframework.util.Assert; /** - * {@link EndpointFilter} that will filter endpoints based on {@code expose} and + * {@link EndpointFilter} that will filter endpoints based on {@code include} and * {@code exclude} properties. * * @param The endpoint type @@ -58,7 +58,7 @@ public class ExposeExcludePropertyEndpointFilter> Assert.hasText(prefix, "Prefix must not be empty"); Binder binder = Binder.get(environment); this.endpointType = endpointType; - this.include = bind(binder, prefix + ".expose"); + this.include = bind(binder, prefix + ".include"); this.exclude = bind(binder, prefix + ".exclude"); this.exposeDefaults = asSet(Arrays.asList(exposeDefaults)); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/ExposeExcludePropertyEndpointFilterTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/ExposeExcludePropertyEndpointFilterTests.java index 624eb59b8a6..0b6b62555ba 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/ExposeExcludePropertyEndpointFilterTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/ExposeExcludePropertyEndpointFilterTests.java @@ -123,7 +123,7 @@ public class ExposeExcludePropertyEndpointFilterTests { @Test public void matchWhenDiscovererDoesNotMatchShouldMatch() { MockEnvironment environment = new MockEnvironment(); - environment.setProperty("foo.expose", "bar"); + environment.setProperty("foo.include", "bar"); environment.setProperty("foo.exclude", ""); this.filter = new ExposeExcludePropertyEndpointFilter<>( DifferentTestExposableWebEndpoint.class, environment, "foo"); @@ -146,9 +146,9 @@ public class ExposeExcludePropertyEndpointFilterTests { assertThat(match("buz")).isFalse(); } - private void setupFilter(String expose, String exclude) { + private void setupFilter(String include, String exclude) { MockEnvironment environment = new MockEnvironment(); - environment.setProperty("foo.expose", expose); + environment.setProperty("foo.include", include); environment.setProperty("foo.exclude", exclude); this.filter = new ExposeExcludePropertyEndpointFilter<>( TestExposableWebEndpoint.class, environment, "foo", "def");