spring-attic / spring-security-javaconfig

Spring Security Java Configuration Support (to be merged with spring-security-config)
175 stars 121 forks source link

Two-filters example from README not working #112

Closed dsyer closed 11 years ago

dsyer commented 11 years ago

It used to work (a couple of weeks ago). Now I think there are 2 problems. One is a user details bean not found exception, and the other is that the null check (http!=null) in the driver configuration prevents one of the filters from being created.

rwinch commented 11 years ago

The only problem that is immediately apparent is that the README sample's was still using the method signature configure(SpringSecurityFilterChainBuilder) instead of configure(WebSecurityConfiguration). I have fixed this.

I'm not getting the UserDetails bean not found exception. Are you using the exact sample or a modified version that is looking for a UserDetailsService? The sample does not register a UserDetailsService since an AuthenticationManager is exposed as a bean. Previously, the sample did use the registerAuthentication method but it changed to illustrate that AuthenticationManager will be autowired by default (so you do not need to override registerAuthentication).

What do you mean by "prevents one of the filters from being created"? It appears to be working fine for me.

rwinch commented 11 years ago

We sorted this out offline. The issue appears when using older Spring Versions. I have added an FAQ entry to the README