use of org.springframework.security.config.PostProcessedMockUserDetailsService in project spring-security by spring-projects.
the class GlobalMethodSecurityBeanDefinitionParserTests method doesntInterfereWithBeanPostProcessing.
@Test
public void doesntInterfereWithBeanPostProcessing() {
setContext("<b:bean id='myUserService' class='org.springframework.security.config.PostProcessedMockUserDetailsService'/>" + "<global-method-security />" + "<authentication-manager>" + " <authentication-provider user-service-ref='myUserService'/>" + "</authentication-manager>" + "<b:bean id='beanPostProcessor' class='org.springframework.security.config.MockUserServiceBeanPostProcessor'/>");
PostProcessedMockUserDetailsService service = (PostProcessedMockUserDetailsService) appContext.getBean("myUserService");
assertThat(service.getPostProcessorWasHere()).isEqualTo("Hello from the post processor!");
}
Aggregations