Closed MarcinMilewski closed 8 years ago
The @Secured annotation doesn't work on controllers for me. I have been tested it with @EnableGlobalMethodSecurity(securedEnabled = true) also and configuration like here: http://stackoverflow.com/questions/24865588/how-to-enable-secured-annotations-with-java-based-configuration . I attached I think pretty nice explanation why.
http://stackoverflow.com/questions/3087548/can-spring-security-use-preauthorize-on-spring-controllers-methods
http://docs.spring.io/spring-security/site/docs/3.2.x/reference/htmlsingle/faq.html#faq-method-security-in-web-context
To be investigated. Thanks.
@MarcinMilewski Fixed. Added new method. Of course I made some preparation before this commit to simplify the configuration (after your feedback, so thanks!)
The @Secured annotation doesn't work on controllers for me. I have been tested it with @EnableGlobalMethodSecurity(securedEnabled = true) also and configuration like here: http://stackoverflow.com/questions/24865588/how-to-enable-secured-annotations-with-java-based-configuration . I attached I think pretty nice explanation why.
http://stackoverflow.com/questions/3087548/can-spring-security-use-preauthorize-on-spring-controllers-methods
http://docs.spring.io/spring-security/site/docs/3.2.x/reference/htmlsingle/faq.html#faq-method-security-in-web-context