在网上搜了好多,实在是没有看到个定论,于是自己一个一个版本实验得到以下结论。
spring-aop5.2.6版本前
<!-- https://mvnrepository.com/artifact/org.springframework/spring-aop -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>5.2.6.RELEASE</version>
</dependency>
执行顺序:
-
Around(proceed之前)
-
Before
-
切入代码
-
Around(proceed之后)
-
After
spring-aop5.2.6版本后
<!-- https://mvnrepository.com/artifact/org.springframework/spring-aop -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>5.2.7.RELEASE</version>
</dependency>
执行顺序:
-
Around(proceed之前)
-
Before
-
切入代码
-
After
-
Around(proceed之后)