Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 31st, 2013  |  syntax: None  |  size: 0.75 KB  |  views: 25  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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" />
clone this paste RAW Paste Data