Springboot1.5.9升级到2.3.3后,aop执行顺序发生了变化。
Spring1.5.9
底层Spring版本为4
执行顺序:
- 正常执行:@Before–>@After–>@AfterReturning
- 异常执行:@Before–>@After–>@AfterThrowing
Spring2.2.3
底层Spring版本为5
执行顺序(Spring5):
- 正常执行:@Before–>@AfterReturning–>@After
- 异常执行:@Before–>@AfterThrowing–>@After
