Methodフィルタを行うInterceptor

ActionのMethod名により適用を制御できる標準のInterceptorは次のとおりであるが

  • TokenInterceptor
  • TokenSessionStoreInterceptor
  • DefaultWorkflowInterceptor
  • ValidationInterceptor
  • ExecuteAndWaitInterceptor
  • ParametersInterceptor
  • PrepareInterceptor

自作のInterceptorで同様のメソッドフィルタ機能を実装する場合、com.opensymphony.xwork2.interceptor.MethodFilterInterceptor を継承すれば excludeMethods、includeMethodsが有効になる。

excludeMethods と includeMethods の優先順位は includeMethods が "*" 以外の場合は、includeMethods に記述されていればInterceptorが適用される。
また、 excludeMethods が "*" で includeMethodsも "*" の場合、全てのMethodにInterceptorが適用される