I'm writing sample application based on the Greenhouse application.
Here is the snapshot from security config:
Here is UsernamePasswordAuthenticationProvider:<authentication-manager>
<authentication-provider ref="usernamePasswordAuthenticationProvider"/>
</authentication-manager>
Inside authenticate authenticationService is null.@Service
public class UsernamePasswordAuthenticationProvider implements AuthenticationProvider {
@Inject
private AuthenticationService authenticationService;
@Override
public Authentication authenticate(Authentication authentication) throws AuthenticationException { ... }
...
}
However I can obtain authenticationService from the application context if implement ApplicationContextAware, but in this case authenticationService missed authenticationRepository.
If I try to @Inject authenticationService into any of the @Controller it is injected correctly with authenticationRepository setup.
All the required <context:component-scan base-package="..."/> are setup correctly in the application.
Does it work for the Greenhouse application at all (yes, there is @Configuration used instead of xml configuration, does it matter?)?


Reply With Quote
