grailsspring-securitygrails-2.3

Preferred package of grails spring security plugin classes


Suppose I want to use Secured annotation of grails spring security core 2.0 plugin, which package should I use: either grails.plugin.springsecurity.annotation.Secured or org.springframework.security.access.annotation.Secured.

I'm using the former one but will there any problem if I use the latter one?


Solution

  • Both are supported, as described in the docs.

    The grails.plugin annotation is newer and has more features, such as letting your define security checks in closures. But the org.springframework annotation (which is part of Spring Security, not the plugin) is still supported; the newer one has the same config optons as the old one and adds some new ones.