0
我有下面的使用java DSL的集成流程,我想將requestPayloadType添加爲java.util.HashMap。 我該怎麼做? 我想JSON輸入被自動識別爲JSON而不是字節如何將requestPayloadType參數設置爲使用Java DSL的HashMap
public IntegrationFlow NotificationFlow() {
return IntegrationFlows
.from(Http.inboundChannelAdapter("/passenger")
.requestChannel(inputChannel())
.autoStartup(true)
.id("httpInnboundPass")
.requestMapping(r -> r.consumes("application/json"))
.**requestPayloadType**()
)
.enrichHeaders(hes -> hes.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE))
.channel("inputChannel")
.get();
}