diff --git a/services-gateway-client-transport/pom.xml b/services-gateway-client-transport/pom.xml index a642b98..e3dffc3 100644 --- a/services-gateway-client-transport/pom.xml +++ b/services-gateway-client-transport/pom.xml @@ -20,6 +20,10 @@ scalecube-services + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + com.fasterxml.jackson.core jackson-core diff --git a/services-gateway-client-transport/src/main/java/io/scalecube/services/gateway/transport/websocket/WebsocketGatewayClientCodec.java b/services-gateway-client-transport/src/main/java/io/scalecube/services/gateway/transport/websocket/WebsocketGatewayClientCodec.java index 9dee6bc..02153e9 100644 --- a/services-gateway-client-transport/src/main/java/io/scalecube/services/gateway/transport/websocket/WebsocketGatewayClientCodec.java +++ b/services-gateway-client-transport/src/main/java/io/scalecube/services/gateway/transport/websocket/WebsocketGatewayClientCodec.java @@ -13,6 +13,7 @@ import com.fasterxml.jackson.databind.MappingJsonFactory; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufAllocator; import io.netty.buffer.ByteBufInputStream; @@ -162,6 +163,8 @@ private static ObjectMapper objectMapper() { mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); mapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true); + mapper.registerModule(new JavaTimeModule()); + mapper.findAndRegisterModules(); return mapper; } } diff --git a/services-gateway-netty/pom.xml b/services-gateway-netty/pom.xml index 3253040..c95a115 100644 --- a/services-gateway-netty/pom.xml +++ b/services-gateway-netty/pom.xml @@ -29,6 +29,10 @@ rsocket-transport-netty + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + com.fasterxml.jackson.core jackson-core diff --git a/services-gateway-netty/src/main/java/io/scalecube/services/gateway/ws/WebsocketServiceMessageCodec.java b/services-gateway-netty/src/main/java/io/scalecube/services/gateway/ws/WebsocketServiceMessageCodec.java index f3369df..0ebbbcd 100644 --- a/services-gateway-netty/src/main/java/io/scalecube/services/gateway/ws/WebsocketServiceMessageCodec.java +++ b/services-gateway-netty/src/main/java/io/scalecube/services/gateway/ws/WebsocketServiceMessageCodec.java @@ -13,6 +13,7 @@ import com.fasterxml.jackson.databind.MappingJsonFactory; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufAllocator; import io.netty.buffer.ByteBufInputStream; @@ -166,6 +167,8 @@ private static ObjectMapper objectMapper() { mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); mapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true); + mapper.registerModule(new JavaTimeModule()); + mapper.findAndRegisterModules(); return mapper; } }