Refactor AuthenticationManagerConfiguration to make sure it works

if user also adds @EnableWebMvcSecurity. The problem is that the ordering
of the init() and configure() methods in the Spring Security configurers
can force things to happen too early unless we are careful. It's still a bit
twitchy I would say, but this relatively small change seems to fix the GS guide
and not break any existing tests.

I added a sample which mimic ths GS guide so we get an integration test that
executes the new code paths.

Fixes gh-1364
This commit is contained in:
Dave Syer
2014-08-11 17:39:35 -07:00
parent 9a7a4a46c9
commit 0cf1c6f0e5
13 changed files with 402 additions and 36 deletions

View File

@@ -52,6 +52,7 @@
<module>spring-boot-sample-web-groovy-templates</module>
<module>spring-boot-sample-web-method-security</module>
<module>spring-boot-sample-web-secure</module>
<module>spring-boot-sample-web-secure-custom</module>
<module>spring-boot-sample-web-static</module>
<module>spring-boot-sample-web-jsp</module>
<module>spring-boot-sample-web-ui</module>