下面列出了怎么用org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration的API类实例代码及写法,或者点击链接到github查看源代码。
@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);
});
}