【发布时间】:2019-02-27 20:27:17
【问题描述】:
我将通过 Spring 集成实现使用 REST 服务,并且我有以下代码。
<int:gateway id="myGateway" service-interface="org.moonshiner.MyGateway"/>
<int:channel id="myInputChannel"/>
<int:chain input-channel="myInputChannel">
<int-http:outbound-gateway
url="${url}"
http-method="GET"
rest-template="oAuth2RestTemplate"
expected-response-type="java.lang.String">
</int-http:outbound-gateway>
<int:transformer ref="myTransformer"/>
</int:chain>
一切正常,但我想做同样的实现,但我不想使用 REST web 服务,而是想在调用网关时从文件夹中读取文件。
有什么建议吗?我尝试使用 file:inbound-channel-adapter,但我不得不定义 poller,我不想这样做,因为我只想在调用网关时读取文件。
【问题讨论】:
标签: java spring spring-integration