mirror of
https://gitee.com/zhijiantianya/ruoyi-vue-pro.git
synced 2025-12-26 08:26:44 +08:00
【代码优化】增强 JDK17、JDK8 之间的兼容性
This commit is contained in:
parent
187acad8bf
commit
a1b07adbf6
@ -190,7 +190,7 @@ public class AliyunSmsClient extends AbstractSmsClient {
|
||||
@SneakyThrows
|
||||
private static String percentCode(String str) {
|
||||
Assert.notNull(str, "str 不能为空");
|
||||
return URLEncoder.encode(str, StandardCharsets.UTF_8)
|
||||
return HttpUtils.encodeUtf8(str)
|
||||
.replace("+", "%20") // 加号 "+" 被替换为 "%20"
|
||||
.replace("*", "%2A") // 星号 "*" 被替换为 "%2A"
|
||||
.replace("%7E", "~"); // 波浪号 "%7E" 被替换为 "~"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user