提交 c9acb495 编写于 作者: Q qxo 提交者: wu-sheng

TraceContextInterceptor:reduce unnecessary call to the origin method TraceContext#traceId() (#3313)

上级 6d944114
...@@ -32,13 +32,13 @@ public class TraceContextInterceptor implements StaticMethodsAroundInterceptor { ...@@ -32,13 +32,13 @@ public class TraceContextInterceptor implements StaticMethodsAroundInterceptor {
@Override public void beforeMethod(Class clazz, Method method, Object[] allArguments, Class<?>[] parameterTypes, @Override public void beforeMethod(Class clazz, Method method, Object[] allArguments, Class<?>[] parameterTypes,
MethodInterceptResult result) { MethodInterceptResult result) {
result.defineReturnValue(ContextManager.getGlobalTraceId());
} }
@Override @Override
public Object afterMethod(Class clazz, Method method, Object[] allArguments, Class<?>[] parameterTypes, public Object afterMethod(Class clazz, Method method, Object[] allArguments, Class<?>[] parameterTypes,
Object ret) { Object ret) {
return ContextManager.getGlobalTraceId(); return ret;
} }
@Override @Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册