Skip to content

Commit 427d494

Browse files
committed
Merge branch '2.0.x'
2 parents fc6c07a + 02a1c43 commit 427d494

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfigurationTests.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar;
2525
import org.springframework.boot.actuate.endpoint.web.annotation.ServletEndpointsSupplier;
2626
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath;
27+
import org.springframework.boot.autoconfigure.web.servlet.JerseyApplicationPath;
2728
import org.springframework.boot.context.properties.EnableConfigurationProperties;
2829
import org.springframework.boot.test.context.FilteredClassLoader;
2930
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
@@ -58,14 +59,14 @@ public void contextShouldContainServletEndpointRegistrar() {
5859
}
5960

6061
@Test
61-
public void servletPathShouldNotAffectJerseyConfiguration() {
62+
public void contextWhenJerseyShouldContainServletEndpointRegistrar() {
6263
FilteredClassLoader classLoader = new FilteredClassLoader(
6364
DispatcherServlet.class);
6465
this.contextRunner.withClassLoader(classLoader).run((context) -> {
6566
assertThat(context).hasSingleBean(ServletEndpointRegistrar.class);
6667
ServletEndpointRegistrar bean = context
6768
.getBean(ServletEndpointRegistrar.class);
68-
assertThat(bean).hasFieldOrPropertyWithValue("basePath", "/actuator");
69+
assertThat(bean).hasFieldOrPropertyWithValue("basePath", "/jersey/actuator");
6970
});
7071
}
7172

@@ -91,6 +92,11 @@ public DispatcherServletPath dispatcherServletPath() {
9192
return () -> "/test";
9293
}
9394

95+
@Bean
96+
public JerseyApplicationPath jerseyApplicationPath() {
97+
return () -> "/jersey";
98+
}
99+
94100
}
95101

96102
}

0 commit comments

Comments
 (0)