use of org.springframework.boot.autoconfigure.security.servlet.AntPathRequestMatcherProvider in project spring-boot by spring-projects.
the class SecurityRequestMatchersManagementContextConfigurationTests method registersRequestMatcherProviderIfMvcPresent.
@Test
void registersRequestMatcherProviderIfMvcPresent() {
this.contextRunner.withUserConfiguration(TestMvcConfiguration.class).run((context) -> {
AntPathRequestMatcherProvider matcherProvider = context.getBean(AntPathRequestMatcherProvider.class);
RequestMatcher requestMatcher = matcherProvider.getRequestMatcher("/example");
assertThat(requestMatcher).extracting("pattern").isEqualTo("/custom/example");
});
}
Aggregations