|
@@ -35,7 +35,7 @@ import java.util.concurrent.ExecutionException;
|
|
|
@Component
|
|
|
public class RemoteApiUtil {
|
|
|
|
|
|
- private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
|
+ private static final Logger logger = LoggerFactory.getLogger(RemoteApiUtil.class);
|
|
|
|
|
|
private static RemoteApiUtil instance;
|
|
|
|
|
@@ -237,15 +237,13 @@ public class RemoteApiUtil {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
public static String encodeUrl(String input) {
|
|
|
try {
|
|
|
// 使用 URLEncoder 类的 encode 方法对输入字符串进行编码
|
|
|
return URLEncoder.encode(input, "UTF-8");
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- return null;
|
|
|
+ logger.error(e.getMessage());
|
|
|
}
|
|
|
+ return null;
|
|
|
}
|
|
|
-
|
|
|
}
|