[英]Is there any kind of dependency concept in Grails Interceptors like in Grails Filters?
In Grails version prior to 3.0, there is dependsOn
keyword that defines dependency of One filter on another. 在3.0之前的Grails版本中,有dependsOn
关键字定义了一个过滤器对另一个过滤器的依赖性。 Is there any kind of dependency mechanism for Interceptors? 拦截器是否有某种依赖机制? I am upgrading grails from 2.x to 3.x where i needed to upgrade a filter that contains dependsOn
and has dependency of other filter. 我正在将grails从2.x升级到3.x,在这里我需要升级一个包含dependsOn
并具有其他过滤器依赖性的过滤器。
Is there any kind of dependency mechanism for Interceptors? 拦截器是否有某种依赖机制?
Yes. 是。
Interceptors support an order
property which affects the order in which interceptors are executed. 拦截器支持order
属性,该属性会影响拦截器的执行顺序。 You can make one interceptor run before or after another by assigning the order
property relative to another interceptors order
property. 通过相对于另一个拦截器order
属性分配order
属性,可以使一个拦截器在另一个拦截器之前或之后运行。
See http://docs.grails.org/3.3.0/guide/theWebLayer.html#interceptorOrdering for more info. 有关更多信息,请参见http://docs.grails.org/3.3.0/guide/theWebLayer.html#interceptorOrdering 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.