简体   繁体   中英

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. 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.

Is there any kind of dependency mechanism for Interceptors?

Yes.

Interceptors support an order property which affects the order in which interceptors are executed. You can make one interceptor run before or after another by assigning the order property relative to another interceptors order property.

See http://docs.grails.org/3.3.0/guide/theWebLayer.html#interceptorOrdering for more info.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM