diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/BaseServiceListener.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/BaseServiceListener.java index 0ec8e5ac7a9670096b64c45e4659b74e4af67e8e..4145b983ec7f9e72fee604fb887019564a9f431b 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/BaseServiceListener.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/BaseServiceListener.java @@ -22,6 +22,10 @@ public abstract class BaseServiceListener implements ServiceListener, RegistryMe return statusCode == null; } }); + + // 解决中文乱码问题 + List> messageConverters = restTemplate.getMessageConverters(); + messageConverters.set(1, new StringHttpMessageConverter(StandardCharsets.UTF_8)); } protected static String buildQuery(String secret) {