切面做法

2023-03-15 美食烹饪 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
猜你感兴趣