public ObjectMapper objectMapper(Jackson2ObjectMapperBuilder builder) {
// 自定义大数字序列化
builder.serializerByType(Long.TYPE, ToStringSerializer.instance);
builder.serializerByType(Long.class, ToStringSerializer.instance);
builder.serializerByType(BigInteger.class, ToStringSerializer.instance);
builder.serializerByType(BigDecimal.class, ToStringSerializer.instance);
扫一扫访问 Blade技术社区 移动端