切面做法

2023-03-15 15:28:01 美食烹饪 720134次阅读 投稿:ღ静心࿐
最佳答案* * @param joinPoint */ @Around("execution(* com.example.demo.controller..*.*(..))") publ
切面做法
*
* @param joinPoint
*/
@Around("execution(* com.example.demo.controller..*.*(..))")
public Object around(ProceedingJoinPoint joinPoint) {

System.out.println("around before");

Object result = null;

try {
// System.out.println("around before");
//调用目标方法
result = joinPoint.proceed();
// System.out.println("around after");

} catch (Throwable e) {
e.printStackTrace();

} finally{
System
声明:趣学生活所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系nqxyy@nqxyy.com