diff --git a/wfc-common/wfc-common-core/pom.xml b/wfc-common/wfc-common-core/pom.xml
index 8512717..dfb5879 100644
--- a/wfc-common/wfc-common-core/pom.xml
+++ b/wfc-common/wfc-common-core/pom.xml
@@ -64,6 +64,10 @@
com.fasterxml.jackson.core
jackson-databind
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
diff --git a/wfc-common/wfc-common-core/src/main/java/org/wfc/common/core/config/JacksonConfig.java b/wfc-common/wfc-common-core/src/main/java/org/wfc/common/core/config/JacksonConfig.java
new file mode 100644
index 0000000..c8f5ec7
--- /dev/null
+++ b/wfc-common/wfc-common-core/src/main/java/org/wfc/common/core/config/JacksonConfig.java
@@ -0,0 +1,47 @@
+package org.wfc.common.core.config;
+
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
+import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
+import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
+import org.springframework.context.annotation.Bean;
+import org.wfc.common.core.jackson.BigNumberSerializer;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.TimeZone;
+
+/**
+ * jackson 配置
+ *
+ * @author Lion Li
+ */
+@Slf4j
+@AutoConfiguration(before = JacksonAutoConfiguration.class)
+public class JacksonConfig {
+
+ @Bean
+ public Jackson2ObjectMapperBuilderCustomizer customizer() {
+ return builder -> {
+ // 全局配置序列化返回 JSON 处理
+ JavaTimeModule javaTimeModule = new JavaTimeModule();
+ javaTimeModule.addSerializer(Long.class, BigNumberSerializer.INSTANCE);
+ javaTimeModule.addSerializer(Long.TYPE, BigNumberSerializer.INSTANCE);
+ javaTimeModule.addSerializer(BigInteger.class, BigNumberSerializer.INSTANCE);
+ javaTimeModule.addSerializer(BigDecimal.class, ToStringSerializer.instance);
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+ javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(formatter));
+ javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(formatter));
+ builder.modules(javaTimeModule);
+ builder.timeZone(TimeZone.getDefault());
+ log.info("初始化 jackson 配置");
+ };
+ }
+
+}
diff --git a/wfc-common/wfc-common-core/src/main/java/org/wfc/common/core/jackson/BigNumberSerializer.java b/wfc-common/wfc-common-core/src/main/java/org/wfc/common/core/jackson/BigNumberSerializer.java
new file mode 100644
index 0000000..46b319b
--- /dev/null
+++ b/wfc-common/wfc-common-core/src/main/java/org/wfc/common/core/jackson/BigNumberSerializer.java
@@ -0,0 +1,42 @@
+package org.wfc.common.core.jackson;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JacksonStdImpl;
+import com.fasterxml.jackson.databind.ser.std.NumberSerializer;
+
+import java.io.IOException;
+
+/**
+ * 超出 JS 最大最小值 处理
+ *
+ * @author Lion Li
+ */
+@JacksonStdImpl
+public class BigNumberSerializer extends NumberSerializer {
+
+ /**
+ * 根据 JS Number.MAX_SAFE_INTEGER 与 Number.MIN_SAFE_INTEGER 得来
+ */
+ private static final long MAX_SAFE_INTEGER = 9007199254740991L;
+ private static final long MIN_SAFE_INTEGER = -9007199254740991L;
+
+ /**
+ * 提供实例
+ */
+ public static final BigNumberSerializer INSTANCE = new BigNumberSerializer(Number.class);
+
+ public BigNumberSerializer(Class extends Number> rawType) {
+ super(rawType);
+ }
+
+ @Override
+ public void serialize(Number value, JsonGenerator gen, SerializerProvider provider) throws IOException {
+ // 超出范围 序列化位字符串
+ if (value.longValue() > MIN_SAFE_INTEGER && value.longValue() < MAX_SAFE_INTEGER) {
+ super.serialize(value, gen, provider);
+ } else {
+ gen.writeString(value.toString());
+ }
+ }
+}
diff --git a/wfc-common/wfc-common-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/wfc-common/wfc-common-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
index 3700959..6b52913 100644
--- a/wfc-common/wfc-common-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ b/wfc-common/wfc-common-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -1 +1,2 @@
org.wfc.common.core.utils.SpringUtils
+org.wfc.common.core.config.JacksonConfig