@Test
public void testDisableIgnoredStaticApplicationPaths() throws Exception {
this.context = new AnnotationConfigWebApplicationContext();
this.context.setServletContext(new MockServletContext());
this.context.register(SecurityAutoConfiguration.class,
ManagementWebSecurityAutoConfiguration.class,
EndpointAutoConfiguration.class,
ManagementServerPropertiesAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class);
EnvironmentTestUtils.addEnvironment(this.context, "security.ignored:none");
this.context.refresh();
// Just the application and management endpoints now
assertEquals(2,
this.context.getBean(FilterChainProxy.class).getFilterChains().size());
}
ManagementWebSecurityAutoConfigurationTests.java 文件源码
java
阅读 45
收藏 0
点赞 0
评论 0
项目:contestparser
作者:
评论列表
文章目录