gpt4 book ai didi

java - spring-integration http 出站网关不支持 é 等法语字符

转载 作者:行者123 更新时间:2023-11-30 07:27:20 30 4
gpt4 key购买 nike

我正在尝试从 http 出站网关发送此字符串“de caisse a été enregistr***é*** ”。此字符串包含法语字符(é)。我收到一个错误,响应代码为 400(错误请求)

但是,当我在 Rest Easy 客户端框架中尝试相同的操作时,我得到了成功代码(200)。

我的 Spring 集成配置中是否缺少某些内容? ?

共享配置

<int-http:outbound-gateway id="xtifygateway"

request-channel="xtifyrequestchannel" request-factory="requestFactory"

url="${xtifyUrl}" http-method="POST">

</int-http:outbound-gateway>




<int:header-enricher input-channel="requestchannel"
output-channel="xtifyrequestchannel">
<int:header
name="Content-Type"
value="application/json"/>
</int:header-enricher



<bean id="requestFactory"
class="org.springframework.http.client.SimpleClientHttpRequestFactory">
<property name="connectTimeout" value="${timeout}" />
<property name="readTimeout" value="${timeout}" />
</bean>


最佳答案

您应该尝试设置字符集

<int-http:outbound-gateway id="xtifygateway"

request-channel="xtifyrequestchannel" request-factory="requestFactory" charset="UTF-8"

url="${xtifyUrl}" http-method="POST">

</int-http:outbound-gateway>

关于java - spring-integration http 出站网关不支持 é 等法语字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36647644/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com