`

Struts2拦截器属性excludeMethods、includeMethods配置无效的原因

 
阅读更多

Struts2拦截器属性excludeMethods、includeMethods配置无效的原因:

拦截器如果通过实现Interceptor接口生成的话,属性excludeMethods、includeMethods配置无效。拦截器如果通过继承MethodFilterInterceptor类的话,属性excludeMethods、includeMethods配置有效。

public class UserLoginInterceptor extends MethodFilterInterceptor implements Interceptor{
	private static final long serialVersionUID = 1L;
	@Override
	protected String doIntercept(ActionInvocation invocation) throws Exception {
		return "";
	}
}

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics