refactor: 优化字符串模板方法 API 使用

This commit is contained in:
2024-02-18 22:44:06 +08:00
parent 89108ad55a
commit c9867844b6
12 changed files with 16 additions and 16 deletions

View File

@@ -97,7 +97,7 @@ public class SpringCacheAutoConfiguration implements CachingConfigurer {
for (int i = 0; i < params.length; i++) {
paramMap.put(String.valueOf(i), params[i]);
}
return String.format("%s:%s", key, DigestUtil.sha256Hex(JSONUtil.toJsonStr(paramMap)));
return "%s:%s".formatted(key, DigestUtil.sha256Hex(JSONUtil.toJsonStr(paramMap)));
};
}