仅
@JsonSerialize(using = ToStringSerializer.class)
无法解决所有问题
需要
PlanckConfiguration { () Jackson2ObjectMapperBuilderCustomizer () { Jackson2ObjectMapperBuilderCustomizer customizer = Jackson2ObjectMapperBuilderCustomizer() { (Jackson2ObjectMapperBuilder jacksonObjectMapperBuilder) { jacksonObjectMapperBuilder.serializerByType(Long.ToStringSerializer.) .serializerByType(Long.ToStringSerializer.)} }customizer} }
支持对所有含Long型数据进行全局过滤, 包括HashMap
扫一扫访问 Blade技术社区 移动端