Browse Source

Pull request #432: DEC-13199 socket序列化时区设置

Merge in CORE/base-third from ~LIDONGY/base-third:release/10.0 to release/10.0

* commit '89c2c8e7ed4ce21e25e9fab7eeebd833b9c82910':
  111
  DEC-13199 websocket序列化时区设置
release/10.0
lidongy 5 years ago
parent
commit
26d393b73d
  1. 4
      fine-socketio/src/com/fr/third/socketio/protocol/JacksonJsonSupport.java

4
fine-socketio/src/com/fr/third/socketio/protocol/JacksonJsonSupport.java

@ -26,6 +26,7 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.TimeZone;
import com.fr.third.socketio.AckCallback;
import com.fr.third.socketio.MultiTypeAckCallback;
@ -324,6 +325,9 @@ public class JacksonJsonSupport implements JsonSupport {
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
objectMapper.configure(SerializationFeature.WRITE_BIGDECIMAL_AS_PLAIN, true);
objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
//时区设置,防止含有Data类型变量时序列化后,前台显示的data内时间不准确
objectMapper.setTimeZone(TimeZone.getDefault());
}
@Override

Loading…
Cancel
Save