Scott introduces action filters, which are attributes that add pre and post processing logic to controller actions.
Soctt介绍了活动过滤器(action filters),它们都以特性(attributes)的形式为控制器活动添加预处理和后处理逻辑。
Filters can be used to pre- and post-process controller methods.
过滤器可用于提前或推迟处理控制器方法。
This example demonstrates the second technique because using filters takes advantage of built-in web application server technology and pre-written code from the Shiro project.
本例展示了第二种技巧,因为使用过滤器充分利用了内置web应用服务器技术以及来自Shiro项目的预先编写好的代码。
应用推荐