Browse Source

DEC-13199 websocket序列化时区设置

release/10.0
lidongy 5 years ago
parent
commit
77fd915ee1
  1. 3
      fine-socketio/src/com/fr/third/socketio/protocol/JacksonJsonSupport.java

3
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.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.TimeZone;
import com.fr.third.socketio.AckCallback; import com.fr.third.socketio.AckCallback;
import com.fr.third.socketio.MultiTypeAckCallback; import com.fr.third.socketio.MultiTypeAckCallback;
@ -324,6 +325,8 @@ public class JacksonJsonSupport implements JsonSupport {
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
objectMapper.configure(SerializationFeature.WRITE_BIGDECIMAL_AS_PLAIN, true); objectMapper.configure(SerializationFeature.WRITE_BIGDECIMAL_AS_PLAIN, true);
objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
objectMapper.setTimeZone(TimeZone.getDefault());
} }
@Override @Override

Loading…
Cancel
Save