@AfterReturning 注解在哪里生效
时间: 2024-04-25 22:21:13 浏览: 100
@AfterReturning注解在方法正常返回后生效。具体来说,它会在目标方法返回结果后执行,但在返回结果之前执行org.springframework.web.method.support.HandlerMethodReturnValueHandler。\[2\]在你提供的代码示例中,@AfterReturning注解被用于一个切面方法,该方法在指定的切入点方法执行后被调用。\[1\]所以,当切入点方法成功执行并返回结果时,@AfterReturning注解的方法会被调用。
#### 引用[.reference_title]
- *1* *2* [spring aop之 @AfterReturning 不生效](https://blog.csdn.net/ql_7256/article/details/128930767)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [@Before @After @Around @AfterReturning @AfterThrowing 执行顺序](https://blog.csdn.net/u011498478/article/details/117822120)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文