diff --git a/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/util/ResponseRenderUtil.java b/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/util/ResponseRenderUtil.java index 829e4f863..79a31f17b 100644 --- a/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/util/ResponseRenderUtil.java +++ b/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/util/ResponseRenderUtil.java @@ -35,6 +35,7 @@ import lombok.extern.slf4j.Slf4j; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.nio.charset.Charset; /** * http响应信息的直接渲染工具 @@ -90,7 +91,7 @@ public class ResponseRenderUtil { */ public static void setRenderFileHeader(HttpServletResponse response, String fileName) { final String charset = ObjectUtil.defaultIfNull(response.getCharacterEncoding(), CharsetUtil.UTF_8); - response.setHeader("Content-Disposition", StrUtil.format("attachment;filename={}", URLUtil.encode(fileName, charset))); + response.setHeader("Content-Disposition", StrUtil.format("attachment;filename={}", URLUtil.encode(fileName, Charset.forName(charset)))); response.setContentType("application/octet-stream; charset=utf-8"); } diff --git a/kernel-d-cache/cache-sdk-memory/src/main/java/cn/stylefeng/roses/kernel/cache/memory/AbstractMemoryCacheOperator.java b/kernel-d-cache/cache-sdk-memory/src/main/java/cn/stylefeng/roses/kernel/cache/memory/AbstractMemoryCacheOperator.java index 9d9de6fa2..b76832c11 100644 --- a/kernel-d-cache/cache-sdk-memory/src/main/java/cn/stylefeng/roses/kernel/cache/memory/AbstractMemoryCacheOperator.java +++ b/kernel-d-cache/cache-sdk-memory/src/main/java/cn/stylefeng/roses/kernel/cache/memory/AbstractMemoryCacheOperator.java @@ -27,6 +27,7 @@ package cn.stylefeng.roses.kernel.cache.memory; import cn.hutool.cache.impl.CacheObj; import cn.hutool.cache.impl.TimedCache; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.StrUtil; import cn.stylefeng.roses.kernel.cache.api.CacheOperatorApi; @@ -107,7 +108,7 @@ public abstract class AbstractMemoryCacheOperator implements CacheOperatorApi @Override public Map getAllKeyValues() { Collection allKeys = this.getAllKeys(); - HashMap results = CollectionUtil.newHashMap(); + HashMap results = MapUtil.newHashMap(); for (String key : allKeys) { results.put(key, this.get(key)); } diff --git a/kernel-d-cache/cache-sdk-redis/src/main/java/cn/stylefeng/roses/kernel/cache/redis/AbstractRedisCacheOperator.java b/kernel-d-cache/cache-sdk-redis/src/main/java/cn/stylefeng/roses/kernel/cache/redis/AbstractRedisCacheOperator.java index 1125271fc..575462bee 100644 --- a/kernel-d-cache/cache-sdk-redis/src/main/java/cn/stylefeng/roses/kernel/cache/redis/AbstractRedisCacheOperator.java +++ b/kernel-d-cache/cache-sdk-redis/src/main/java/cn/stylefeng/roses/kernel/cache/redis/AbstractRedisCacheOperator.java @@ -25,6 +25,7 @@ package cn.stylefeng.roses.kernel.cache.redis; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.StrUtil; import cn.stylefeng.roses.kernel.cache.api.CacheOperatorApi; import org.springframework.data.redis.core.RedisTemplate; @@ -33,7 +34,6 @@ import java.util.*; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; - /** * 基于redis的缓存封装 * @@ -105,7 +105,7 @@ public abstract class AbstractRedisCacheOperator implements CacheOperatorApi< @Override public Map getAllKeyValues() { Collection allKeys = this.getAllKeys(); - HashMap results = CollectionUtil.newHashMap(); + HashMap results = MapUtil.newHashMap(); for (String key : allKeys) { results.put(key, this.get(key)); } diff --git a/kernel-d-cache/cache-sdk-redis/src/main/java/cn/stylefeng/roses/kernel/cache/redis/AbstractRedisHashCacheOperator.java b/kernel-d-cache/cache-sdk-redis/src/main/java/cn/stylefeng/roses/kernel/cache/redis/AbstractRedisHashCacheOperator.java index 3851c0561..248fc28d6 100644 --- a/kernel-d-cache/cache-sdk-redis/src/main/java/cn/stylefeng/roses/kernel/cache/redis/AbstractRedisHashCacheOperator.java +++ b/kernel-d-cache/cache-sdk-redis/src/main/java/cn/stylefeng/roses/kernel/cache/redis/AbstractRedisHashCacheOperator.java @@ -25,6 +25,7 @@ package cn.stylefeng.roses.kernel.cache.redis; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.map.MapUtil; import cn.stylefeng.roses.kernel.cache.api.CacheOperatorApi; import org.springframework.data.redis.core.RedisTemplate; @@ -104,7 +105,7 @@ public abstract class AbstractRedisHashCacheOperator implements CacheOperator @Override public Map getAllKeyValues() { Collection allKeys = this.getAllKeys(); - HashMap results = CollectionUtil.newHashMap(); + HashMap results = MapUtil.newHashMap(); for (String key : allKeys) { results.put(key, this.get(key)); } diff --git a/kernel-d-sms/sms-business-validation/src/main/java/cn/stylefeng/roses/kernel/sms/modular/controller/SmsSenderController.java b/kernel-d-sms/sms-business-validation/src/main/java/cn/stylefeng/roses/kernel/sms/modular/controller/SmsSenderController.java index 50a48223b..cb6221728 100644 --- a/kernel-d-sms/sms-business-validation/src/main/java/cn/stylefeng/roses/kernel/sms/modular/controller/SmsSenderController.java +++ b/kernel-d-sms/sms-business-validation/src/main/java/cn/stylefeng/roses/kernel/sms/modular/controller/SmsSenderController.java @@ -25,6 +25,7 @@ package cn.stylefeng.roses.kernel.sms.modular.controller; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.RandomUtil; import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData; import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData; @@ -79,7 +80,7 @@ public class SmsSenderController { sysSmsSendParam.setParams(null); // 设置模板中的参数 - HashMap paramMap = CollectionUtil.newHashMap(); + HashMap paramMap = MapUtil.newHashMap(); paramMap.put("code", RandomUtil.randomNumbers(6)); sysSmsSendParam.setParams(paramMap); diff --git a/kernel-d-sms/sms-business-validation/src/main/java/cn/stylefeng/roses/kernel/sms/modular/service/impl/SysSmsInfoServiceImpl.java b/kernel-d-sms/sms-business-validation/src/main/java/cn/stylefeng/roses/kernel/sms/modular/service/impl/SysSmsInfoServiceImpl.java index 58dc4afd9..29f2cca21 100644 --- a/kernel-d-sms/sms-business-validation/src/main/java/cn/stylefeng/roses/kernel/sms/modular/service/impl/SysSmsInfoServiceImpl.java +++ b/kernel-d-sms/sms-business-validation/src/main/java/cn/stylefeng/roses/kernel/sms/modular/service/impl/SysSmsInfoServiceImpl.java @@ -25,6 +25,7 @@ package cn.stylefeng.roses.kernel.sms.modular.service.impl; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.StrUtil; @@ -106,7 +107,7 @@ public class SysSmsInfoServiceImpl extends ServiceImpl imp else { validateCode = RandomUtil.randomNumbers(6); if (params == null) { - params = CollectionUtil.newHashMap(); + params = MapUtil.newHashMap(); } params.put(SMS_CODE_PARAM_NAME, validateCode); } diff --git a/pom.xml b/pom.xml index e8ee050f7..1f95c17bd 100644 --- a/pom.xml +++ b/pom.xml @@ -119,7 +119,7 @@ UTF-8 UTF-8 7.1.3 - 5.4.4 + 5.7.6 1.2.74 1.18.14 3.4.0