问题: 用了自定义的 CustomJsonAopConfigration 后,不走 signCheckInterceptor 签名栏截器了,直接跳过,
不知道是什么原因,麻烦看一下,谢谢!
aop.js 文件内容:
var ioc = {
signCheckInterceptor : {
type :'cn.guagua.mobile.interceptor.SignCheckInterceptor'
},
userValidityInterceptor : {
type : "cn.guagua.mobile.interceptor.UserValidityInterceptor"
},
$aop : {
type : 'cn.guagua.mobile.interceptor.CustomJsonAopConfigration',
fields : {
itemList : [
['cn\\.guagua\\.mobile\\..+Module','.+','ioc:userValidityInterceptor'],
['cn\\.guagua\\.mobile\\..+Module','.+','ioc:signCheckInterceptor'],
]
}
},
guaguaJsonView : {
type : "cn.guagua.mobile.common.GuaguaJsonView"
}
};
自定义jsonAop:
public class CustomJsonAopConfigration extends JsonAopConfigration{
@Override
public List<InterceptorPair> getInterceptorPairList(Ioc ioc, Class<?> clazz) {
List<InterceptorPair> ipList = new ArrayList<InterceptorPair>();
List<AopConfigrationItem> aopItemList = new ArrayList<AopConfigrationItem>();
for (AopConfigrationItem aopItem : aopItemList) {
if (aopItem.matchClassName(clazz.getName()))
ipList.add(new InterceptorPair( getMethodInterceptor( ioc,
aopItem.getInterceptor(),
aopItem.isSingleton()),
MethodMatcherFactory.matcher(aopItem.getMethodName())));
}
return ipList;
}
}