优化spel表达式解析工具类
This commit is contained in:
@@ -13,7 +13,13 @@ import java.lang.annotation.*;
|
||||
*/
|
||||
public @interface BizTracing {
|
||||
|
||||
/**
|
||||
* 交易流水tag名
|
||||
*/
|
||||
String BIZ_ID_TAG = "bizId";
|
||||
/**
|
||||
* 交易类型tag名
|
||||
*/
|
||||
String BIZ_TYPE_TAG = "bizType";
|
||||
|
||||
String bizId();
|
||||
|
||||
@@ -21,8 +21,8 @@ public class BizTracingAop {
|
||||
|
||||
@Around(value = "@annotation(bizTracing)")
|
||||
public void tagBizInfo(ProceedingJoinPoint joinPoint, BizTracing bizTracing) {
|
||||
String bizId = SpElUtil.analysisSpEl(bizTracing.bizId(), joinPoint);
|
||||
String bizType = SpElUtil.analysisSpEl(bizTracing.bizType(), joinPoint);
|
||||
String bizId = (String) SpElUtil.analysisSpEl(bizTracing.bizId(), joinPoint);
|
||||
String bizType = (String) SpElUtil.analysisSpEl(bizTracing.bizType(), joinPoint);
|
||||
if (StrUtil.isBlankIfStr(bizId)) {
|
||||
log.error("empty biz: bizId[{}], bizType[{}].", bizId, bizType);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user