List of usage examples for org.springframework.security.authentication ProviderManager setMessageSource
public void setMessageSource(MessageSource messageSource)
From source file:ru.anr.base.services.SecurityConfig.java
/** * Defining a {@link AuthenticationManager} bean * //from w w w . j a va 2 s. com * @param messageSource * Message source instance * @return A bean instance * * @throws Exception * In case of ProviderManager initialization error */ @Bean(name = "authenticationManager") @DependsOn("messageSource") public AuthenticationManager authenticationManager(MessageSource messageSource) throws Exception { ProviderManager providerManager = new ProviderManager(providers); providerManager.setMessageSource(messageSource); providerManager.setAuthenticationEventPublisher(new DefaultAuthenticationEventPublisher()); providerManager.afterPropertiesSet(); return providerManager; }