Java源码示例:org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration
示例1@Test
public void should_return_management_context_with_context_path() throws Exception {
contextRunner
.withConfiguration(
UserConfigurations.of(ManagementContextAutoConfiguration.class,
ServerPropertiesConfig.class))
.withPropertyValues("management.server.servlet.context-path=foo")
.run(context -> {
then(extractAllPatterns(context)).containsExactlyInAnyOrder(
"/actuator(/|/(health|health/.*|info|info/.*))?", "foo.*",
SleuthWebProperties.DEFAULT_SKIP_PATTERN);
});
}