问题
I'd like to know if there's a way I can tell Play to use the Secure module for every controller, without having to add With(Secure.class) to all my controllers or making all my controllers extend a single class. Ideas anyone?
回答1:
Yes you can intercept every-request with a play-plugin. Just have a look on modules/docviewer. It's very easy to implement. At the moment I'm working on a security-module where everything is forbidden as a default.
来源:https://stackoverflow.com/questions/4597766/easy-way-to-use-secure-module-or-similar-on-all-controllers-in-play