Default configuration of AbstractMessageChannelMessagingSendingTemplate leads to Jackson error: "Could not write JSON: Java 8 date/time type java.time.Instant
not supported by default"
#217
Labels
component: sqs
SQS integration related issue
status: waiting-for-triage
Team has not yet looked into this issue
type: bug
Something isn't working
Type: Bug
Component: SQS
Describe the bug
Using Jackson 2.13 and trying to send messages (QueueMessagingTemplate.convertAndSend) that contains fields of Java date/time types lead to the following Jackson error:
"Could not write JSON: Java 8 date/time type
java.time.Instant
not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling"According to this ticket spring-projects/spring-boot#26859 Spring normally configure the ObjectMapper bean correct to support Java date/time during serialization.
But the class io.awspring.cloud.messaging.core.support.AbstractMessageChannelMessagingSendingTemplate creates an own MappingJackson2MessageConverter with a default ObjectMapper without using already configured beans.
I would expect that awspring also configure the ObjectMapper to support date/time types if com.fasterxml.jackson.datatype:jackson-datatype-jsr310 is on the class path or better to use an existing ObjectMapper bean.
The text was updated successfully, but these errors were encountered: