【同步】BOOT 和 CLOUD 的功能
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled

This commit is contained in:
YunaiV
2026-03-08 10:18:09 +08:00
parent bb3f1954ee
commit 3f599a623a
6 changed files with 14 additions and 12 deletions

View File

@@ -59,10 +59,11 @@ public class HttpUtils {
* @param path URL 路径
* @return 解码后的路径
*/
@SneakyThrows
public static String decodeUrlPath(String path) {
// 先将 + 替换为 %2B避免被 URLDecoder 解码为空格
String encoded = path.replace("+", "%2B");
return URLDecoder.decode(encoded, StandardCharsets.UTF_8);
return URLDecoder.decode(encoded, StandardCharsets.UTF_8.name());
}
@SuppressWarnings("unchecked")