@MonitorMethodAdvice public class MonitorMethodBefore extends AbstractMonitorMethod
LogMethodBefore
非private/final的方法,非AOP调用的方法也是不支持的
LogMethodBeforeproperties| Constructor and Description |
|---|
MonitorMethodBefore() |
| Modifier and Type | Method and Description |
|---|---|
void |
allWantToMatch()
监控规则
|
void |
doBefore(org.aspectj.lang.JoinPoint joinPoint)
使用 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()
监控哪些方法
方法、类上有@LogMethodBefore注解,自定义Log注解:
@app.myoss.cloud.apm.log.method.aspectj.annotation.LogMethodBefore
|
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.LogMethodBefore
public void allWantToMatch()
public void doBefore(org.aspectj.lang.JoinPoint joinPoint)
joinPoint - AOP JoinPointCopyright © 2018. All rights reserved.