11<?xml version =" 1.0" encoding =" UTF-8" ?>
2- <beans : beans xmlns =" http://www.springframework.org/schema/security"
3- xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns : beans =" http://www.springframework.org/schema/beans"
4- xsi:schemaLocation="
2+ <beans : beans xmlns =" http://www.springframework.org/schema/security" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xmlns : beans =" http://www.springframework.org/schema/beans"
3+ xsi : schemaLocation ="
54 http://www.springframework.org/schema/security
65 http://www.springframework.org/schema/security/spring-security-3.1.xsd
76 http://www.springframework.org/schema/beans
87 http://www.springframework.org/schema/beans/spring-beans-3.2.xsd" >
98
10- <http use-expressions =" true" >
11- <intercept-url pattern =" /anonymous*" access =" isAnonymous()" />
9+ <http use-expressions =" true" >
10+ <intercept-url pattern =" /anonymous*" access =" isAnonymous()" />
1211 <intercept-url pattern =" /login*" access =" permitAll" />
1312 <intercept-url pattern =" /**" access =" isAuthenticated()" />
1413
15- <form-login
16- login-page=' /login.html'
17- login-processing-url=" /perform_login"
18- authentication-success-handler-ref=" myAuthenticationSuccessHandler"
19- authentication-failure-url=" /login.html?error=true"
20- />
21-
22- <logout
23- logout-url=" /perform_logout"
24- delete-cookies =" JSESSIONID"
25- />
26-
27- </http >
14+ <form-login login-page =' /login.html' authentication-success-handler-ref =" myAuthenticationSuccessHandler" authentication-failure-url =" /login.html?error=true" />
2815
29- <beans : bean id =" myAuthenticationSuccessHandler"
30- class=" org.baeldung.security.MySimpleUrlAuthenticationSuccessHandler" />
16+ <logout delete-cookies =" JSESSIONID" />
3117
32- <authentication-manager >
33- <authentication-provider >
34- <user-service >
35- <user name =" user1" password =" user1Pass" authorities =" ROLE_USER" />
36- <user name =" user2" password =" user2Pass" authorities =" ROLE_USER" />
37- <user name =" admin1" password =" admin1Pass" authorities =" ROLE_ADMIN" />
38- </user-service >
39- </authentication-provider >
40- </authentication-manager >
18+ </http >
19+
20+ <beans : bean id =" myAuthenticationSuccessHandler" class =" org.baeldung.security.MySimpleUrlAuthenticationSuccessHandler" />
21+
22+ <authentication-manager >
23+ <authentication-provider >
24+ <user-service >
25+ <user name =" user1" password =" user1Pass" authorities =" ROLE_USER" />
26+ <user name =" admin1" password =" admin1Pass" authorities =" ROLE_ADMIN" />
27+ </user-service >
28+ </authentication-provider >
29+ </authentication-manager >
4130
4231</beans : beans >
0 commit comments