我正在尝试读取HTTP服务器上托管的CSV文件。当我尝试从HTTP出站网关以字符串形式读取数据时,它将返回空白。
<int:gateway default-request-channel="AdapterCollectRequestChannel"
service-interface="com.markono.sfp.intg.adapter.ad004.AD004CollectGateway">
<int:method name="invokeHTTP" payload-expression="#args[4]" reply-timeout="5000">
<int:header name="Content-Type" value="application/octet-stream;charset=utf-8" />
<int:header name="HttpMethod" value="GET" />
<int:header expression="#args[0]" name="Machine" />
<int:header expression="#args[1]" name="Process" />
<int:header expression="#args[2]" name="ApiName" />
<int:header expression="#args[3]" name="HttpUri" />
</int:method>
</int:gateway>
<int-http:outbound-gateway charset="UTF-8"
encode-uri="false" expected-response-type="java.lang.String"
http-method-expression="headers.HttpMethod" reply-channel="AdapterCollectReplyChannel"
reply-timeout="5000"
request-channel="AdapterCollectRequestChannel"
url="{uri}">
<int-http:uri-variable expression="headers.HttpUri" name="uri" />
</int-http:outbound-gateway>
当我尝试读取输入内容时,我返回为空。
public List<String> transform(Message<Buffer> message) {
message.toString();
message.getPayload();
是否可以不下载CSV文件就读取缓冲区?