Skip to content

Commit 22e3646

Browse files
committed
Merge pull request #49591 from bbbbooo
* gh-49591: Polish "Fix EndpointRequest links matching for separate management port" Fix EndpointRequest links matching for separate management port Closes gh-49591
2 parents ab7d6a9 + a148983 commit 22e3646

10 files changed

Lines changed: 218 additions & 79 deletions

File tree

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/security/reactive/EndpointRequest.java

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,13 @@ private boolean hasImplicitServerNamespace(ApplicationContext applicationContext
228228
&& applicationContext.getParent() == null;
229229
}
230230

231+
protected final String getLinksPath(String basePath) {
232+
if (StringUtils.hasText(basePath)) {
233+
return basePath;
234+
}
235+
return (this.managementPortType == ManagementPortType.DIFFERENT) ? "/" : null;
236+
}
237+
231238
protected final String toString(List<Object> endpoints, String emptyValue) {
232239
return (!endpoints.isEmpty()) ? endpoints.stream()
233240
.map(this::getEndpointId)
@@ -326,7 +333,8 @@ protected ServerWebExchangeMatcher createDelegate(PathMappedEndpoints endpoints)
326333
streamPaths(this.includes, endpoints).forEach(paths::add);
327334
streamPaths(this.excludes, endpoints).forEach(paths::remove);
328335
List<ServerWebExchangeMatcher> delegateMatchers = getDelegateMatchers(paths, this.httpMethod);
329-
if (this.includeLinks && StringUtils.hasText(endpoints.getBasePath())) {
336+
String linksPath = getLinksPath(endpoints.getBasePath());
337+
if (this.includeLinks && linksPath != null) {
330338
delegateMatchers.add(new LinksServerWebExchangeMatcher());
331339
}
332340
if (delegateMatchers.isEmpty()) {
@@ -362,10 +370,14 @@ private LinksServerWebExchangeMatcher() {
362370

363371
@Override
364372
protected ServerWebExchangeMatcher createDelegate(WebEndpointProperties properties) {
365-
if (StringUtils.hasText(properties.getBasePath())) {
366-
return new OrServerWebExchangeMatcher(
367-
new PathPatternParserServerWebExchangeMatcher(properties.getBasePath()),
368-
new PathPatternParserServerWebExchangeMatcher(properties.getBasePath() + "/"));
373+
String linksPath = getLinksPath(properties.getBasePath());
374+
if (linksPath != null) {
375+
List<ServerWebExchangeMatcher> linksMatchers = new ArrayList<>();
376+
linksMatchers.add(new PathPatternParserServerWebExchangeMatcher(linksPath));
377+
if (!linksPath.endsWith("/")) {
378+
linksMatchers.add(new PathPatternParserServerWebExchangeMatcher(linksPath + "/"));
379+
}
380+
return new OrServerWebExchangeMatcher(linksMatchers);
369381
}
370382
return EMPTY_MATCHER;
371383
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequest.java

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,27 @@ protected final List<RequestMatcher> getDelegateMatchers(RequestMatcherFactory r
225225
}
226226

227227
protected List<RequestMatcher> getLinksMatchers(RequestMatcherFactory requestMatcherFactory,
228-
RequestMatcherProvider matcherProvider, String basePath) {
228+
RequestMatcherProvider matcherProvider, String linksPath) {
229229
List<RequestMatcher> linksMatchers = new ArrayList<>();
230-
linksMatchers.add(requestMatcherFactory.antPath(matcherProvider, null, basePath));
231-
linksMatchers.add(requestMatcherFactory.antPath(matcherProvider, null, basePath, "/"));
230+
linksMatchers.add(requestMatcherFactory.antPath(matcherProvider, null, linksPath));
231+
if (!linksPath.endsWith("/")) {
232+
linksMatchers.add(requestMatcherFactory.antPath(matcherProvider, null, linksPath, "/"));
233+
}
232234
return linksMatchers;
233235
}
234236

237+
protected String getLinksPath(WebApplicationContext context, String basePath) {
238+
if (StringUtils.hasText(basePath)) {
239+
return basePath;
240+
}
241+
ManagementPortType managementPortType = this.managementPortType;
242+
if (managementPortType == null) {
243+
managementPortType = ManagementPortType.get(context.getEnvironment());
244+
this.managementPortType = managementPortType;
245+
}
246+
return (managementPortType == ManagementPortType.DIFFERENT) ? "/" : null;
247+
}
248+
235249
protected RequestMatcherProvider getRequestMatcherProvider(WebApplicationContext context) {
236250
try {
237251
return getRequestMatcherProviderBean(context);
@@ -359,8 +373,9 @@ protected RequestMatcher createDelegate(WebApplicationContext context,
359373
List<RequestMatcher> delegateMatchers = getDelegateMatchers(requestMatcherFactory, matcherProvider, paths,
360374
this.httpMethod);
361375
String basePath = endpoints.getBasePath();
362-
if (this.includeLinks && StringUtils.hasText(basePath)) {
363-
delegateMatchers.addAll(getLinksMatchers(requestMatcherFactory, matcherProvider, basePath));
376+
String linksPath = getLinksPath(context, basePath);
377+
if (this.includeLinks && linksPath != null) {
378+
delegateMatchers.addAll(getLinksMatchers(requestMatcherFactory, matcherProvider, linksPath));
364379
}
365380
if (delegateMatchers.isEmpty()) {
366381
return EMPTY_MATCHER;
@@ -393,10 +408,10 @@ public static final class LinksRequestMatcher extends AbstractRequestMatcher {
393408
protected RequestMatcher createDelegate(WebApplicationContext context,
394409
RequestMatcherFactory requestMatcherFactory) {
395410
WebEndpointProperties properties = context.getBean(WebEndpointProperties.class);
396-
String basePath = properties.getBasePath();
397-
if (StringUtils.hasText(basePath)) {
411+
String linksPath = getLinksPath(context, properties.getBasePath());
412+
if (linksPath != null) {
398413
return new OrRequestMatcher(
399-
getLinksMatchers(requestMatcherFactory, getRequestMatcherProvider(context), basePath));
414+
getLinksMatchers(requestMatcherFactory, getRequestMatcherProvider(context), linksPath));
400415
}
401416
return EMPTY_MATCHER;
402417
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/reactive/EndpointRequestTests.java

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.springframework.boot.actuate.endpoint.web.PathMappedEndpoint;
3333
import org.springframework.boot.actuate.endpoint.web.PathMappedEndpoints;
3434
import org.springframework.boot.actuate.endpoint.web.WebServerNamespace;
35+
import org.springframework.boot.test.util.TestPropertyValues;
3536
import org.springframework.boot.web.context.WebServerApplicationContext;
3637
import org.springframework.boot.web.server.WebServer;
3738
import org.springframework.context.support.StaticApplicationContext;
@@ -91,6 +92,15 @@ void toAnyEndpointWhenBasePathIsEmptyShouldNotMatchLinks() {
9192
assertMatcher.matches("/bar");
9293
}
9394

95+
@Test
96+
void toAnyEndpointWhenBasePathIsEmptyAndManagementPortDifferentShouldMatchLinks() {
97+
ServerWebExchangeMatcher matcher = EndpointRequest.toAnyEndpoint();
98+
RequestMatcherAssert assertMatcher = assertMatcher(matcher, mockPathMappedEndpoints(""),
99+
WebServerNamespace.MANAGEMENT);
100+
assertMatcher.matches("/");
101+
assertMatcher.matches("/foo");
102+
}
103+
94104
@Test
95105
void toAnyEndpointShouldNotMatchOtherPath() {
96106
ServerWebExchangeMatcher matcher = EndpointRequest.toAnyEndpoint();
@@ -143,6 +153,15 @@ void toLinksWhenBasePathEmptyShouldNotMatch() {
143153
assertMatcher.doesNotMatch("/");
144154
}
145155

156+
@Test
157+
void toLinksWhenBasePathEmptyAndManagementPortDifferentShouldMatchRoot() {
158+
ServerWebExchangeMatcher matcher = EndpointRequest.toLinks();
159+
RequestMatcherAssert assertMatcher = assertMatcher(matcher, mockPathMappedEndpoints(""),
160+
WebServerNamespace.MANAGEMENT);
161+
assertMatcher.matches("/");
162+
assertMatcher.doesNotMatch("/foo");
163+
}
164+
146165
@Test
147166
void excludeByClassShouldNotMatchExcluded() {
148167
ServerWebExchangeMatcher matcher = EndpointRequest.toAnyEndpoint()
@@ -325,10 +344,14 @@ private RequestMatcherAssert assertMatcher(ServerWebExchangeMatcher matcher,
325344

326345
private RequestMatcherAssert assertMatcher(ServerWebExchangeMatcher matcher,
327346
PathMappedEndpoints pathMappedEndpoints, WebServerNamespace namespace) {
328-
StaticApplicationContext context = new StaticApplicationContext();
347+
StaticWebApplicationContext context;
329348
if (namespace != null && !WebServerNamespace.SERVER.equals(namespace)) {
330-
NamedStaticWebApplicationContext parentContext = new NamedStaticWebApplicationContext(namespace);
331-
context.setParent(parentContext);
349+
context = new NamedStaticWebApplicationContext(namespace);
350+
context.setParent(new StaticWebApplicationContext());
351+
TestPropertyValues.of("management.server.port=0").applyTo(context);
352+
}
353+
else {
354+
context = new StaticWebApplicationContext();
332355
}
333356
context.registerBean(WebEndpointProperties.class);
334357
if (pathMappedEndpoints != null) {

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequestTests.java

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.springframework.boot.actuate.endpoint.web.PathMappedEndpoint;
3535
import org.springframework.boot.actuate.endpoint.web.PathMappedEndpoints;
3636
import org.springframework.boot.actuate.endpoint.web.WebServerNamespace;
37+
import org.springframework.boot.test.util.TestPropertyValues;
3738
import org.springframework.boot.web.context.WebServerApplicationContext;
3839
import org.springframework.boot.web.server.WebServer;
3940
import org.springframework.http.HttpMethod;
@@ -91,6 +92,15 @@ void toAnyEndpointWhenBasePathIsEmptyShouldNotMatchLinks() {
9192
assertMatcher.matches("/bar");
9293
}
9394

95+
@Test
96+
void toAnyEndpointWhenBasePathIsEmptyAndManagementPortDifferentShouldMatchLinks() {
97+
RequestMatcher matcher = EndpointRequest.toAnyEndpoint();
98+
RequestMatcherAssert assertMatcher = assertMatcher(matcher, mockPathMappedEndpoints(""), null,
99+
WebServerNamespace.MANAGEMENT);
100+
assertMatcher.matches("/");
101+
assertMatcher.matches("/foo");
102+
}
103+
94104
@Test
95105
void toAnyEndpointShouldNotMatchOtherPath() {
96106
RequestMatcher matcher = EndpointRequest.toAnyEndpoint();
@@ -150,6 +160,15 @@ void toLinksWhenBasePathEmptyShouldNotMatch() {
150160
assertMatcher.doesNotMatch("/");
151161
}
152162

163+
@Test
164+
void toLinksWhenBasePathEmptyAndManagementPortDifferentShouldMatchRoot() {
165+
RequestMatcher matcher = EndpointRequest.toLinks();
166+
RequestMatcherAssert assertMatcher = assertMatcher(matcher, mockPathMappedEndpoints(""), null,
167+
WebServerNamespace.MANAGEMENT);
168+
assertMatcher.matches("/");
169+
assertMatcher.doesNotMatch("/foo");
170+
}
171+
153172
@Test
154173
void excludeByClassShouldNotMatchExcluded() {
155174
RequestMatcher matcher = EndpointRequest.toAnyEndpoint().excluding(FooEndpoint.class, BazServletEndpoint.class);
@@ -350,10 +369,14 @@ private RequestMatcherAssert assertMatcher(RequestMatcher matcher, PathMappedEnd
350369

351370
private RequestMatcherAssert assertMatcher(RequestMatcher matcher, PathMappedEndpoints pathMappedEndpoints,
352371
RequestMatcherProvider matcherProvider, WebServerNamespace namespace) {
353-
StaticWebApplicationContext context = new StaticWebApplicationContext();
372+
StaticWebApplicationContext context;
354373
if (namespace != null && !WebServerNamespace.SERVER.equals(namespace)) {
355-
NamedStaticWebApplicationContext parentContext = new NamedStaticWebApplicationContext(namespace);
356-
context.setParent(parentContext);
374+
context = new NamedStaticWebApplicationContext(namespace);
375+
context.setParent(new StaticWebApplicationContext());
376+
TestPropertyValues.of("management.server.port=0").applyTo(context);
377+
}
378+
else {
379+
context = new StaticWebApplicationContext();
357380
}
358381
context.registerBean(WebEndpointProperties.class);
359382
if (pathMappedEndpoints != null) {

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-custom-security/src/test/java/smoketest/actuator/customsecurity/AbstractSampleActuatorCustomSecurityTests.java

Lines changed: 32 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ abstract class AbstractSampleActuatorCustomSecurityTests {
3737

3838
abstract String getPath();
3939

40-
abstract String getManagementPath();
40+
abstract String getActuatorPath();
4141

4242
abstract Environment getEnvironment();
4343

@@ -58,128 +58,118 @@ void testInsecureStaticResources() {
5858

5959
@Test
6060
void actuatorInsecureEndpoint() {
61-
ResponseEntity<String> entity = restTemplate().getForEntity(getManagementPath() + "/actuator/health",
62-
String.class);
61+
ResponseEntity<String> entity = restTemplate().getForEntity(getActuatorPath() + "/health", String.class);
6362
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
6463
assertThat(entity.getBody()).contains("\"status\":\"UP\"");
65-
entity = restTemplate().getForEntity(getManagementPath() + "/actuator/health/diskSpace", String.class);
64+
entity = restTemplate().getForEntity(getActuatorPath() + "/health/diskSpace", String.class);
6665
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
6766
assertThat(entity.getBody()).contains("\"status\":\"UP\"");
6867
}
6968

7069
@Test
7170
void actuatorLinksWithAnonymous() {
72-
ResponseEntity<Object> entity = restTemplate().getForEntity(getManagementPath() + "/actuator", Object.class);
71+
ResponseEntity<Object> entity = restTemplate().getForEntity(getActuatorPath(), Object.class);
7372
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
74-
entity = restTemplate().getForEntity(getManagementPath() + "/actuator/", Object.class);
73+
entity = restTemplate().getForEntity(getActuatorPath() + "/", Object.class);
7574
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
7675
}
7776

7877
@Test
7978
void actuatorLinksWithUnauthorizedUser() {
80-
ResponseEntity<Object> entity = userRestTemplate().getForEntity(getManagementPath() + "/actuator",
81-
Object.class);
79+
ResponseEntity<Object> entity = userRestTemplate().getForEntity(getActuatorPath(), Object.class);
8280
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.FORBIDDEN);
83-
entity = userRestTemplate().getForEntity(getManagementPath() + "/actuator/", Object.class);
81+
entity = userRestTemplate().getForEntity(getActuatorPath() + "/", Object.class);
8482
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.FORBIDDEN);
8583
}
8684

8785
@Test
8886
void actuatorLinksWithAuthorizedUser() {
89-
ResponseEntity<Object> entity = adminRestTemplate().getForEntity(getManagementPath() + "/actuator",
90-
Object.class);
87+
ResponseEntity<Object> entity = adminRestTemplate().getForEntity(getActuatorPath(), Object.class);
9188
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
92-
adminRestTemplate().getForEntity(getManagementPath() + "/actuator/", Object.class);
89+
adminRestTemplate().getForEntity(getActuatorPath() + "/", Object.class);
9390
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
9491
}
9592

9693
@Test
9794
void actuatorSecureEndpointWithAnonymous() {
98-
ResponseEntity<Object> entity = restTemplate().getForEntity(getManagementPath() + "/actuator/env",
99-
Object.class);
95+
ResponseEntity<Object> entity = restTemplate().getForEntity(getActuatorPath() + "/env", Object.class);
10096
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
101-
entity = restTemplate().getForEntity(
102-
getManagementPath() + "/actuator/env/management.endpoints.web.exposure.include", Object.class);
97+
entity = restTemplate().getForEntity(getActuatorPath() + "/env/management.endpoints.web.exposure.include",
98+
Object.class);
10399
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
104100
}
105101

106102
@Test
107103
void actuatorSecureEndpointWithUnauthorizedUser() {
108-
ResponseEntity<Object> entity = userRestTemplate().getForEntity(getManagementPath() + "/actuator/env",
109-
Object.class);
104+
ResponseEntity<Object> entity = userRestTemplate().getForEntity(getActuatorPath() + "/env", Object.class);
110105
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.FORBIDDEN);
111-
entity = userRestTemplate().getForEntity(
112-
getManagementPath() + "/actuator/env/management.endpoints.web.exposure.include", Object.class);
106+
entity = userRestTemplate().getForEntity(getActuatorPath() + "/env/management.endpoints.web.exposure.include",
107+
Object.class);
113108
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.FORBIDDEN);
114109
}
115110

116111
@Test
117112
void actuatorSecureEndpointWithAuthorizedUser() {
118-
ResponseEntity<Object> entity = adminRestTemplate().getForEntity(getManagementPath() + "/actuator/env",
119-
Object.class);
113+
ResponseEntity<Object> entity = adminRestTemplate().getForEntity(getActuatorPath() + "/env", Object.class);
120114
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
121-
entity = adminRestTemplate().getForEntity(getManagementPath() + "/actuator/env/", Object.class);
115+
entity = adminRestTemplate().getForEntity(getActuatorPath() + "/env/", Object.class);
122116
// EndpointRequest matches the trailing slash but MVC doesn't
123117
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
124-
entity = adminRestTemplate().getForEntity(
125-
getManagementPath() + "/actuator/env/management.endpoints.web.exposure.include", Object.class);
118+
entity = adminRestTemplate().getForEntity(getActuatorPath() + "/env/management.endpoints.web.exposure.include",
119+
Object.class);
126120
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
127121
}
128122

129123
@Test
130124
void secureServletEndpointWithAnonymous() {
131-
ResponseEntity<String> entity = restTemplate().getForEntity(getManagementPath() + "/actuator/se1",
132-
String.class);
125+
ResponseEntity<String> entity = restTemplate().getForEntity(getActuatorPath() + "/se1", String.class);
133126
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
134-
entity = restTemplate().getForEntity(getManagementPath() + "/actuator/se1/list", String.class);
127+
entity = restTemplate().getForEntity(getActuatorPath() + "/se1/list", String.class);
135128
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
136129
}
137130

138131
@Test
139132
void secureServletEndpointWithUnauthorizedUser() {
140-
ResponseEntity<String> entity = userRestTemplate().getForEntity(getManagementPath() + "/actuator/se1",
141-
String.class);
133+
ResponseEntity<String> entity = userRestTemplate().getForEntity(getActuatorPath() + "/se1", String.class);
142134
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.FORBIDDEN);
143-
entity = userRestTemplate().getForEntity(getManagementPath() + "/actuator/se1/list", String.class);
135+
entity = userRestTemplate().getForEntity(getActuatorPath() + "/se1/list", String.class);
144136
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.FORBIDDEN);
145137
}
146138

147139
@Test
148140
void secureServletEndpointWithAuthorizedUser() {
149-
ResponseEntity<String> entity = adminRestTemplate().getForEntity(getManagementPath() + "/actuator/se1",
150-
String.class);
141+
ResponseEntity<String> entity = adminRestTemplate().getForEntity(getActuatorPath() + "/se1", String.class);
151142
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
152-
entity = adminRestTemplate().getForEntity(getManagementPath() + "/actuator/se1/list", String.class);
143+
entity = adminRestTemplate().getForEntity(getActuatorPath() + "/se1/list", String.class);
153144
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
154145
}
155146

156147
@Test
157148
void actuatorCustomMvcSecureEndpointWithAnonymous() {
158-
ResponseEntity<String> entity = restTemplate()
159-
.getForEntity(getManagementPath() + "/actuator/example/echo?text={t}", String.class, "test");
149+
ResponseEntity<String> entity = restTemplate().getForEntity(getActuatorPath() + "/example/echo?text={t}",
150+
String.class, "test");
160151
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
161152
}
162153

163154
@Test
164155
void actuatorCustomMvcSecureEndpointWithUnauthorizedUser() {
165-
ResponseEntity<String> entity = userRestTemplate()
166-
.getForEntity(getManagementPath() + "/actuator/example/echo?text={t}", String.class, "test");
156+
ResponseEntity<String> entity = userRestTemplate().getForEntity(getActuatorPath() + "/example/echo?text={t}",
157+
String.class, "test");
167158
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.FORBIDDEN);
168159
}
169160

170161
@Test
171162
void actuatorCustomMvcSecureEndpointWithAuthorizedUser() {
172-
ResponseEntity<String> entity = adminRestTemplate()
173-
.getForEntity(getManagementPath() + "/actuator/example/echo?text={t}", String.class, "test");
163+
ResponseEntity<String> entity = adminRestTemplate().getForEntity(getActuatorPath() + "/example/echo?text={t}",
164+
String.class, "test");
174165
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
175166
assertThat(entity.getBody()).isEqualTo("test");
176167
assertThat(entity.getHeaders().getFirst("echo")).isEqualTo("test");
177168
}
178169

179170
@Test
180171
void actuatorExcludedFromEndpointRequestMatcher() {
181-
ResponseEntity<Object> entity = userRestTemplate().getForEntity(getManagementPath() + "/actuator/mappings",
182-
Object.class);
172+
ResponseEntity<Object> entity = userRestTemplate().getForEntity(getActuatorPath() + "/mappings", Object.class);
183173
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
184174
}
185175

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-custom-security/src/test/java/smoketest/actuator/customsecurity/CustomServletPathSampleActuatorTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ String getPath() {
4242
}
4343

4444
@Override
45-
String getManagementPath() {
46-
return "http://localhost:" + this.port + "/example";
45+
String getActuatorPath() {
46+
return "http://localhost:" + this.port + "/example/actuator";
4747
}
4848

4949
@Override

0 commit comments

Comments
 (0)