fix(syslog-consumer-rule)解决ObjectMapper多实例冲突

This commit is contained in:
王绍宏
2026-09-14 23:38:47 +08:00
parent 1c07acc01d
commit 668a0aca88
2 changed files with 48 additions and 1 deletions
@@ -3,6 +3,7 @@ package com.common.service;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;
@@ -35,7 +36,8 @@ public class RawLogCaptureClusterStore {
@Value("${syslog.raw-capture.cluster-activation-delay-ms:1000}")
private long activationDelayMs = 1000L;
public RawLogCaptureClusterStore(StringRedisTemplate redis, ObjectMapper mapper,
public RawLogCaptureClusterStore(StringRedisTemplate redis,
@Qualifier("httpObjectMapper") ObjectMapper mapper,
@Value("${syslog.raw-capture.node-id:${HOSTNAME:unknown}}")
String configuredNodeId) {
this.redis = redis;