Aspectj后置返回通知 接口: package chapter1.server; public interface IHelloService2 { public int sayAfterReturning(String param); } 接口实现 package chapter1.service.impl; import chapter1.server.IHelloService2; public class HelloService2 implements IHelloService2…
在前置通知和后置通知的基础上加上返回通知&异常通知&环绕通知 代码: package com.cn.spring.aop.impl; //加减乘除的接口类 public interface ArithmeticCalculator { int add(int i, int j); int sub(int i, int j); int mul(int i, int j); int div(int i, int j); } package com.cn.spring.aop.impl; imp…