Spring Integration with Jackson ObjectMapper and Java 8 Time (JSR-310)

后端 未结 2 1784
野的像风
野的像风 2021-01-21 17:53

I am struggling with configuring a \"custom\" ObjectMapper to be used by the Spring Integration DSL transformers. I receive an java.time.Instant json representation

2条回答
  •  迷失自我
    2021-01-21 18:26

    Have you defined an encoder to your channel adapter?

    You should always use an encoder for whichever adapter you're using, inbound channel adapter or message drive channel adapter.

    In your case StringEncoder should solve the problem.

    
    

提交回复
热议问题