---
title: "Springboot 2.0 jackson序列化问题"
author: "QING____"
date: "2019-03-30T15:24:07Z"
tags: []
categories: ["企业架构"]
slug: "springboot-2-0-jackson"
draft: false
lastmod: "2019-03-30T15:24:07Z"
id: 2439545
url: "https://shift-alt-ctrl.iteye.com/blog/2439545"
---

Springboot 2.0之后，Rest接口序列化的时候有些小问题需要注意，主要是Date类型，原版本序列化话为long型时间戳，薪版本将会序列化为一个utc时间字符串。为了保持接口兼容、以及对其他解析程序的便捷，我们简单修改一下配置即可。

 

 

```
spring.jackson.time-zone=GMT+08:00
spring.jackson.serialization.write-dates-as-timestamps=true
```