更新时间:2023-01-17 08:08:38
关于强制Spring的问题与Spring Boot无关集成使用它。
There is nothing to do with the Spring Boot on the matter to force Spring Integration to use that.
你只需配置 JsonToObjectTransformer
,你的 jsonObjetMapper()
:
@Bean
@Transformer(inputChannel="input", outputChannel="output")
JsonToObjectTransformer jsonToObjectTransformer() {
return new JsonToObjectTransformer(jsonObjectMapper());
}
虽然没有理由注册 JsonObjectMapper
作为一个bean。
Although there is no reason to register JsonObjectMapper
as a bean.