在webwork文檔中對攔截包含或排除的方法有如下說明:
抽象的攔截器可以通過指定included/excluded方法列表來實(shí)現(xiàn)可選擇性
可以設(shè)置的參數(shù)如下:
它的示例用法:
<interceptor-ref name="validation"><param name="excludeMethods">myValidationExcudeMethod</param></interceptor-ref>
其中值得注意的是,如果要使用此機(jī)制,攔截器的實(shí)現(xiàn)必須繼承 MethodFilterInterceptor 而不是實(shí)現(xiàn) Interceptor 接口,參見 com.opensymphony.xwork.validator.ValidationInterceptor。