SHARE
TWEET

Untitled

a guest Jul 31st, 2013 26 Never
  1. <http auto-config="true" use-expressions="false">
  2.     <form-login login-processing-url="/static/j_spring_security_check"
  3.         login-page="/login"
  4.         authentication-failure-url="/login?login_error=t"/>        
  5.  
  6.     <intercept-url pattern="/**"
  7.                     access="ROLE_ADMIN" />
  8. </http>
  9.        
  10. @Controller
  11. @RequestMapping("login")
  12. public class Logincontroller {
  13. /**
  14.  * the logger used for print useful information
  15.  */
  16. protected final Log logger = LogFactory.getLog(getClass());
  17.  
  18. @RequestMapping(value="",method=RequestMethod.GET)
  19. public String showLoginView(Map<String, Object> model) {
  20.     return WebappConstants.HOME_VIEW;
  21. }
  22.        
  23. <intercept-url pattern="/login" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
  24. <intercept-url pattern="/**" access="ROLE_ADMIN" />
RAW Paste Data
Top