@MonitorMethodAdvice public class MonitorMethodAfter extends AbstractMonitorMethod
LogMethodAfter
非private/final的方法,非AOP调用的方法也是不支持的
LogMethodAfterproperties| Constructor and Description |
|---|
MonitorMethodAfter() |
| Modifier and Type | Method and Description |
|---|---|
void |
allWantToMatch()
监控规则
|
void |
doAfterReturning(org.aspectj.lang.JoinPoint joinPoint,
Object result)
使用 AOP 记录方法的返回值
|
void |
unWantToMatch()
排除哪些方法
排除方法上有@ExceptionHandler注解,Controller的异常处理:
@org.springframework.web.bind.annotation.ExceptionHandler
排除方法上有@Scheduled注解,Spring Task定时任务:
@org.springframework.scheduling.annotation.Scheduled
排除方法、类上有@LogUnMonitor注解,自定义Log注解:
@app.myoss.cloud.apm.log.method.aspectj.annotation.LogUnMonitor
排除方法、类上有@LogMethodAround注解,自定义Log注解:
@app.myoss.cloud.apm.log.method.aspectj.annotation.LogMethodAround
|
void |
wantToMatch()
监控哪些方法
方法、类上有@LogMethodAfter注解,自定义Log注解:
@app.myoss.cloud.apm.log.method.aspectj.annotation.LogMethodAfter
|
convertArgs, convertArgs, toJSONStringpublic void unWantToMatch()
@org.springframework.web.bind.annotation.ExceptionHandler
@org.springframework.scheduling.annotation.Scheduled
@app.myoss.cloud.apm.log.method.aspectj.annotation.LogUnMonitor
@app.myoss.cloud.apm.log.method.aspectj.annotation.LogMethodAround
AspectJExpressionPointcut.matches(Method,
Class, boolean)public void wantToMatch()
@app.myoss.cloud.apm.log.method.aspectj.annotation.LogMethodAfter
public void allWantToMatch()
public void doAfterReturning(org.aspectj.lang.JoinPoint joinPoint,
Object result)
joinPoint - AOP JoinPointresult - 方法返回值Copyright © 2018–2020. All rights reserved.