mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 20:49:00 +08:00
✨ Introducing new features. Long 输出 String 避免精度丢失
This commit is contained in:
1 parent
e5dd87ab66
commit
8895e96f71
1 file changed
+2
+2
@@ -2,6 +2,7 @@ package com.pig4cloud.pigx.common.core.config;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.pig4cloud.pigx.common.core.jackson.PigxJavaTimeModule;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
@@ -43,6 +44,7 @@ public class JacksonConfig implements WebMvcConfigurer {
|
||||
builder.locale(Locale.CHINA);
|
||||
builder.timeZone(TimeZone.getTimeZone(ASIA_SHANGHAI));
|
||||
builder.simpleDateFormat(DatePattern.NORM_DATETIME_PATTERN);
|
||||
builder.serializerByType(Long.class, ToStringSerializer.instance);
|
||||
builder.modules(new PigxJavaTimeModule());
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user