From 968d76f79f856c2caf57284eef78c666f4c55416 Mon Sep 17 00:00:00 2001 From: Dafengsu <1187344209@qq.com> Date: Wed, 11 Mar 2020 01:54:59 +0800 Subject: [PATCH] Fixed the wrong execution order of the methods annotated by @AfterReturning and @After in the AOP annotation implementation. --- .../aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java index 2f3896e90c35..3c9679dc6854 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java @@ -74,7 +74,7 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto static { Comparator adviceKindComparator = new ConvertingComparator<>( new InstanceComparator<>( - Around.class, Before.class, After.class, AfterReturning.class, AfterThrowing.class), + Around.class, Before.class, AfterReturning.class, AfterThrowing.class, After.class), (Converter) method -> { AspectJAnnotation annotation = AbstractAspectJAdvisorFactory.findAspectJAnnotationOnMethod(method);