Is it possible to secure whole Controller in Symfony 2?
问题 I am using JMSSecurityExtra bundle for securing methods in my contoller. But is there any way that i can secure the whole controller with @Secure ? 回答1: This can be done as per Documentaion https://github.com/schmittjoh/JMSSecurityExtraBundle/issues/50 Tip: If you like to secure all actions of the controller with the same rule, you may also specify @PreAuthorize on the class itself. Caution though, this rule is only applied to the methods which are declared in the class. use JMS