spring aop用注解得到controller的返回值ModelAndView 发表于 2019-10-16 分类于 spring 阅读次数: Valine: 在Advice(增强方法)上面添加@AfterReturningreturning中就是返回值,不过是Object类,在参数位置写上Object view,用来接受参数,在后面通过类型转换转为ModelAndView 1234@AfterReturning(returning = "view",pointcut = "execution(* controller.testController.*(..))")public void insertMessage(Object view){ System.out.println(view);}