From 8c350025ce5faf24a5544df106ab20363f566c87 Mon Sep 17 00:00:00 2001
From: huangxz <huangxz@xiaopeng.com>
Date: 星期六, 07 三月 2026 21:00:29 +0800
Subject: [PATCH] feat: 注释掉LocalMockConfig中的Feign调用日志记录功能
---
xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/config/LocalMockConfig.java | 104 ++++++++++++++++++++++++++--------------------------
1 files changed, 52 insertions(+), 52 deletions(-)
diff --git a/xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/config/LocalMockConfig.java b/xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/config/LocalMockConfig.java
index fa451a8..b80bd1d 100644
--- a/xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/config/LocalMockConfig.java
+++ b/xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/config/LocalMockConfig.java
@@ -1,57 +1,57 @@
-package com.xiaopeng.automaticPilot.config;
-
-import lombok.extern.slf4j.Slf4j;
-import org.aspectj.lang.ProceedingJoinPoint;
-import org.aspectj.lang.annotation.Around;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.reflect.MethodSignature;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Profile;
-
-import java.util.Arrays;
-
-@Slf4j
-@Aspect
-@Configuration
-//@Profile("local")
-public class LocalMockConfig {
-
-// // ---- mock: getSecretById 远程不可用时返回本地 secret ----
+//package com.xiaopeng.automaticPilot.config;
//
-// @Around("execution(* com.xiaopeng.unifiedverification.service.AuthBizServiceForSdk.getSecretById(..))")
-// public Object mockGetSecretById(ProceedingJoinPoint pjp) {
+//import lombok.extern.slf4j.Slf4j;
+//import org.aspectj.lang.ProceedingJoinPoint;
+//import org.aspectj.lang.annotation.Around;
+//import org.aspectj.lang.annotation.Aspect;
+//import org.aspectj.lang.reflect.MethodSignature;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.context.annotation.Profile;
+//
+//import java.util.Arrays;
+//
+//@Slf4j
+//@Aspect
+//@Configuration
+////@Profile("local")
+//public class LocalMockConfig {
+//
+//// // ---- mock: getSecretById 远程不可用时返回本地 secret ----
+////
+//// @Around("execution(* com.xiaopeng.unifiedverification.service.AuthBizServiceForSdk.getSecretById(..))")
+//// public Object mockGetSecretById(ProceedingJoinPoint pjp) {
+//// try {
+//// return pjp.proceed();
+//// } catch (Throwable e) {
+//// log.warn("[LocalMock] getSecretById 远程调用失败,返回本地 mock secret. error: {}", e.getMessage());
+//// return "ghepbrwmgcispjja";
+//// }
+//// }
+//
+// // ---- feign 调用全量日志 ----
+//
+// @Around(
+// "within(@org.springframework.cloud.openfeign.FeignClient *)" +
+// " || within(com.xiaopeng.unifiedverification.remote.feign..*)"
+// )
+// public Object logFeignCall(ProceedingJoinPoint pjp) throws Throwable {
+// MethodSignature sig = (MethodSignature) pjp.getSignature();
+// String clazz = sig.getDeclaringType().getSimpleName();
+// String method = sig.getName();
+// Object[] args = pjp.getArgs();
+//
+// log.info("[FeignLog] >>> {}.{}() args={}", clazz, method, Arrays.toString(args));
+// long start = System.currentTimeMillis();
// try {
-// return pjp.proceed();
+// Object result = pjp.proceed();
+// log.info("[FeignLog] <<< {}.{}() cost={}ms result={}", clazz, method,
+// System.currentTimeMillis() - start, result);
+// return result;
// } catch (Throwable e) {
-// log.warn("[LocalMock] getSecretById 远程调用失败,返回本地 mock secret. error: {}", e.getMessage());
-// return "ghepbrwmgcispjja";
+// log.error("[FeignLog] <<< {}.{}() cost={}ms EXCEPTION: {} - {}",
+// clazz, method, System.currentTimeMillis() - start,
+// e.getClass().getName(), e.getMessage());
+// throw e;
// }
// }
-
- // ---- feign 调用全量日志 ----
-
- @Around(
- "within(@org.springframework.cloud.openfeign.FeignClient *)" +
- " || within(com.xiaopeng.unifiedverification.remote.feign..*)"
- )
- public Object logFeignCall(ProceedingJoinPoint pjp) throws Throwable {
- MethodSignature sig = (MethodSignature) pjp.getSignature();
- String clazz = sig.getDeclaringType().getSimpleName();
- String method = sig.getName();
- Object[] args = pjp.getArgs();
-
- log.info("[FeignLog] >>> {}.{}() args={}", clazz, method, Arrays.toString(args));
- long start = System.currentTimeMillis();
- try {
- Object result = pjp.proceed();
- log.info("[FeignLog] <<< {}.{}() cost={}ms result={}", clazz, method,
- System.currentTimeMillis() - start, result);
- return result;
- } catch (Throwable e) {
- log.error("[FeignLog] <<< {}.{}() cost={}ms EXCEPTION: {} - {}",
- clazz, method, System.currentTimeMillis() - start,
- e.getClass().getName(), e.getMessage());
- throw e;
- }
- }
-}
+//}
--
Gitblit v1.7.1