Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 1.04 KB  |  hits: 17  |  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. SpringSecurity multiple namespaces and secured-annotations. Great confusion
  2. <global-method-security secured-annotations="enabled" />
  3.  
  4. <http pattern="/rest/**" authentication-manager-ref="authenticationManager" entry-point-ref="restAuthenticationEntryPoint">
  5.     <form-login login-page="/rest/login" login-processing-url="/rest/postlogin"
  6.         authentication-success-handler-ref="restAuthenticationSuccessHandler"
  7.         authentication-failure-handler-ref="restAuthenticationFailureHandler"
  8.         username-parameter="username" password-parameter="password" />
  9.     <logout logout-url="/rest/logout" invalidate-session="true" />
  10. </http>
  11.  
  12. <http pattern="/**" authentication-manager-ref="authenticationManager">
  13.     <form-login login-page="/login" login-processing-url="/postlogin"
  14.         username-parameter="username" password-parameter="password" />
  15.     <logout />
  16. </http>
  17.        
  18. @Secured({"ROLE_USER"})
  19. @RequestMapping(method = RequestMethod.GET, headers = { "Range" })
  20. public @ResponseBody
  21. HttpEntity<List<T>> list(@RequestHeader("Range") String range) {