feat():修复字符集转换的问题

master
WeiRan 2024-08-09 11:02:24 +08:00
parent 1e894f1a58
commit 3c3dcbdfd1
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ public class NacosNamespaceInterceptor<T> implements Interceptor<T> {
public boolean beforeExecute(ForestRequest req) { public boolean beforeExecute(ForestRequest req) {
// log.info("invoke Simple beforeExecute"); // log.info("invoke Simple beforeExecute");
if (StringUtils.isNotEmpty(namespaceId)){ if (StringUtils.isNotEmpty(namespaceId)){
String reqNamespaceId = Convert.str(req.getQuery("namespaceId"),""); String reqNamespaceId = Convert.utf8Str(req.getQuery("namespaceId"));
if (reqNamespaceId==null){ if (reqNamespaceId==null){
log.warn("本次请求nacos的namespaceId未携带已添加[{}]",namespaceId); log.warn("本次请求nacos的namespaceId未携带已添加[{}]",namespaceId);
req.addQuery("namespaceId", namespaceId); // 添加URL的Query参数 req.addQuery("namespaceId", namespaceId); // 添加URL的Query参数