刘帅
2026-09-22 bc68f4393cafe39c4fce614c8128936067ea25f7
cloud-server-other/src/main/java/com/dsh/other/audit/FeignAuditConfiguration.java
@@ -1,15 +1,9 @@
package com.dsh.other.audit;
import feign.Logger;
import com.dsh.other.service.SysAccountAuditLogService;
import org.springframework.context.annotation.Bean;
/** 为本服务全部 OpenFeign 客户端启用审计;请求参数正文不会被落库。 */
/** Feign 是服务间实现细节,不能作为用户操作写入审计表。 */
public class FeignAuditConfiguration {
    /** 创建由 Spring 注入审计服务的 Feign 日志器。 */
    @Bean
    public Logger feignLogger(SysAccountAuditLogService auditLogService) {
        return new FeignAuditLogger(auditLogService);
    }
    @Bean public Logger.Level feignLoggerLevel() { return Logger.Level.BASIC; }
    @Bean public Logger.Level feignLoggerLevel() { return Logger.Level.NONE; }
}