当前位置:网站首页>Proceedingjoinpoint API use
Proceedingjoinpoint API use
2022-07-06 14:21:00 【Code siege lion】
@Around("myPointcut()")
public Integer AroundSave(ProceedingJoinPoint joinPoint) throws Throwable {
/*1、 Get the parameters of the target method :save(new User()), here user Object can get */
Object[] args = joinPoint.getArgs();
System.out.println(" This is a joinPoint Of Api Start --------------------");
System.out.println(" Print target method parameter list args ="+ Arrays.toString(args));
/*2、 You can get the reflection object of the target method Method*/
MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
Method method = methodSignature.getMethod();
System.out.println(" Get the object name of the target method :"+method);
/*2.1、 from method Reflection objects get basic information */
Class<?> declaringClass = method.getDeclaringClass();
String className = declaringClass.getName();
System.out.println(" Get the name of the class "+className);
System.out.println(" Surround notification begins ");
Integer result= (Integer) joinPoint.proceed();
System.out.println(" End of surround notification ");
return result;
}

边栏推荐
- Feature extraction and detection 14 plane object recognition
- . How to upload XMIND files to Jinshan document sharing online editing?
- Network technology related topics
- 图书管理系统
- 7-6 local minimum of matrix (PTA program design)
- [experiment index of educator database]
- Wei Shen of Peking University revealed the current situation: his class is not very good, and there are only 5 or 6 middle-term students left after leaving class
- 强化学习基础记录
- Analysis of penetration test learning and actual combat stage
- Middleware vulnerability recurrence Apache
猜你喜欢

Attack and defense world misc practice area (GIF lift table ext3)

Interpretation of iterator related "itertools" module usage

Hackmyvm target series (1) -webmaster

How to turn wechat applet into uniapp

Detailed explanation of network foundation routing

HackMyvm靶机系列(7)-Tron

附加简化版示例数据库到SqlServer数据库实例中

Poker game program - man machine confrontation

Strengthen basic learning records

【VMware异常问题】问题分析&解决办法
随机推荐
This article explains in detail how mockmvc is used in practical work
List and data frame of R language experiment III
Experiment five categories and objects
JDBC transactions, batch processing, and connection pooling (super detailed)
内网渗透之内网信息收集(四)
Mixlab unbounded community white paper officially released
. How to upload XMIND files to Jinshan document sharing online editing?
Canvas foundation 2 - arc - draw arc
[experiment index of educator database]
Chain team implementation (C language)
How to turn wechat applet into uniapp
7-11 mechanic mustadio (PTA program design)
Applet Web Capture -fiddler
浅谈漏洞发现思路
Intensive literature reading series (I): Courier routing and assignment for food delivery service using reinforcement learning
Strengthen basic learning records
Internet Management (Information Collection)
Ucos-iii learning records (11) - task management
7-14 error ticket (PTA program design)
网络基础详解