Skip to content

Commit

Permalink
Rename expose to include
Browse files Browse the repository at this point in the history
  • Loading branch information
izeye authored and snicoll committed Mar 21, 2018
1 parent 40fd888 commit 1e2e8b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
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 <E> The endpoint type
Expand All @@ -58,7 +58,7 @@ public ExposeExcludePropertyEndpointFilter(Class<E> endpointType,
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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void matchWhenExposeMatchesWithDifferentCaseShouldMatch() {
@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");
Expand All @@ -146,9 +146,9 @@ public void matchWhenExcludeIsAsteriskShouldMatchNone() {
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");
Expand Down

0 comments on commit 1e2e8b1

Please sign in to comment.