Commit 5f45f73caa1763ee4474df45df243c8b7fabf808
1 parent
4cc45d73
去除无效引用,添加注释
Showing
1 changed file
with
6 additions
and
4 deletions
src/main/java/cn/iocoder/dashboard/common/annotation/BizTracingAop.java
| @@ -6,18 +6,20 @@ import org.apache.skywalking.apm.toolkit.trace.ActiveSpan; | @@ -6,18 +6,20 @@ import org.apache.skywalking.apm.toolkit.trace.ActiveSpan; | ||
| 6 | import org.aspectj.lang.ProceedingJoinPoint; | 6 | import org.aspectj.lang.ProceedingJoinPoint; |
| 7 | import org.aspectj.lang.annotation.Around; | 7 | import org.aspectj.lang.annotation.Around; |
| 8 | import org.aspectj.lang.annotation.Aspect; | 8 | import org.aspectj.lang.annotation.Aspect; |
| 9 | -import org.aspectj.lang.annotation.Before; | ||
| 10 | -import org.aspectj.lang.annotation.Pointcut; | ||
| 11 | import org.springframework.context.annotation.Configuration; | 9 | import org.springframework.context.annotation.Configuration; |
| 12 | -import org.springframework.web.bind.annotation.ResponseBody; | ||
| 13 | 10 | ||
| 11 | +/** | ||
| 12 | + * 业务链路AOP切面 | ||
| 13 | + * | ||
| 14 | + * @author mashu | ||
| 15 | + */ | ||
| 14 | @Aspect | 16 | @Aspect |
| 15 | @Slf4j | 17 | @Slf4j |
| 16 | @Configuration | 18 | @Configuration |
| 17 | public class BizTracingAop { | 19 | public class BizTracingAop { |
| 18 | 20 | ||
| 19 | @Around(value = "@annotation(bizTracing)") | 21 | @Around(value = "@annotation(bizTracing)") |
| 20 | - public void tagBizInfo( ProceedingJoinPoint joinPoint, BizTracing bizTracing) { | 22 | + public void tagBizInfo(ProceedingJoinPoint joinPoint, BizTracing bizTracing) { |
| 21 | String bizId = SpElUtil.analysisSpEl(bizTracing.bizId(), joinPoint); | 23 | String bizId = SpElUtil.analysisSpEl(bizTracing.bizId(), joinPoint); |
| 22 | String bizType = SpElUtil.analysisSpEl(bizTracing.bizType(), joinPoint); | 24 | String bizType = SpElUtil.analysisSpEl(bizTracing.bizType(), joinPoint); |
| 23 | log.info("accept biz: bizId[{}], bizType[{}].", bizId, bizType); | 25 | log.info("accept biz: bizId[{}], bizType[{}].", bizId, bizType); |