相关帖子
- 其他回帖
-
-
someone26671 • • 1捐赠者 作者
已解决
@Component public class CustomObjectMapper extends ObjectMapper { public CustomObjectMapper() { super(); SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(Long.class, ToStringSerializer.instance); simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance); registerModule(simpleModule); } }