增加项目README.md
This commit is contained in:
		@@ -34,6 +34,7 @@ public class CustomAdvice {
 | 
			
		||||
        System.out.println(name + "方法调用前:获取调用参数" + Arrays.toString(args));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // returning 参数用于指定返回结果与哪一个参数绑定
 | 
			
		||||
    @AfterReturning(pointcut = "pointCut()", returning = "result")
 | 
			
		||||
    public void afterReturning(JoinPoint joinPoint, Object result) {
 | 
			
		||||
        System.out.println("后置返回通知结果" + result);
 | 
			
		||||
@@ -48,6 +49,7 @@ public class CustomAdvice {
 | 
			
		||||
        return proceed;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // throwing 参数用于指定抛出的异常与哪一个参数绑定
 | 
			
		||||
    @AfterThrowing(pointcut = "pointCut()", throwing = "exception")
 | 
			
		||||
    public void afterThrowing(JoinPoint joinPoint, Exception exception) {
 | 
			
		||||
        System.err.println("后置异常通知:" + exception);
 | 
			
		||||
 
 | 
			
		||||
@@ -5,13 +5,11 @@ import com.heibaiying.service.OrderService;
 | 
			
		||||
import org.junit.Test;
 | 
			
		||||
import org.junit.runner.RunWith;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Qualifier;
 | 
			
		||||
import org.springframework.test.context.ContextConfiguration;
 | 
			
		||||
import org.springframework.test.context.junit4.SpringRunner;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @author : heibaiying
 | 
			
		||||
 * @description : 关于多个切面在同一个切入点上执行顺序的例子 可以在spring-aop-annotation 中查看
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@RunWith(SpringRunner.class)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user