NutzCN Logo
问答 Nutz aop拦截器
发布于 2516天前 作者 qq_bbb57628 2781 次浏览 复制 上一个帖子 下一个帖子
标签:
@Aop({"authInterceptor"})
	@At("im/test")
	@Ok("json")	
	public Result test(){
		Result re = new Result();
		re.setObj("访问成功");
		re.setInfo(Params.str_noRequestAuth);
		re.setStatus(Params.status_failed);
		return re;
	}
@IocBean
public class AuthInterceptor implements MethodInterceptor{

	public void filter(InterceptorChain chain){
		System.out.println("方法即将执行 -->" + chain.getCallingMethod());
	}
}

接口return返回值是NULL???

3 回复
	public void filter(InterceptorChain chain){
		System.out.println("方法即将执行 -->" + chain.getCallingMethod());
                chain.doChain();
	}

OK。
通过这个拦截器对接口进行角色权限验证,拦截器里怎么获取参数

看InterceptorChain

添加回复
请先登陆
回到顶部