升级hutool版本至5.7.6

pull/22/head v7.1.3
rays 2021-09-29 15:35:15 +08:00
parent ce77a02ec7
commit b328c3392b
7 changed files with 13 additions and 8 deletions

View File

@ -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");
}

View File

@ -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<T> implements CacheOperatorApi
@Override
public Map<String, T> getAllKeyValues() {
Collection<String> allKeys = this.getAllKeys();
HashMap<String, T> results = CollectionUtil.newHashMap();
HashMap<String, T> results = MapUtil.newHashMap();
for (String key : allKeys) {
results.put(key, this.get(key));
}

View File

@ -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<T> implements CacheOperatorApi<
@Override
public Map<String, T> getAllKeyValues() {
Collection<String> allKeys = this.getAllKeys();
HashMap<String, T> results = CollectionUtil.newHashMap();
HashMap<String, T> results = MapUtil.newHashMap();
for (String key : allKeys) {
results.put(key, this.get(key));
}

View File

@ -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<T> implements CacheOperator
@Override
public Map<String, T> getAllKeyValues() {
Collection<String> allKeys = this.getAllKeys();
HashMap<String, T> results = CollectionUtil.newHashMap();
HashMap<String, T> results = MapUtil.newHashMap();
for (String key : allKeys) {
results.put(key, this.get(key));
}

View File

@ -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<String, Object> paramMap = CollectionUtil.newHashMap();
HashMap<String, Object> paramMap = MapUtil.newHashMap();
paramMap.put("code", RandomUtil.randomNumbers(6));
sysSmsSendParam.setParams(paramMap);

View File

@ -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<SysSmsMapper, SysSms> imp
else {
validateCode = RandomUtil.randomNumbers(6);
if (params == null) {
params = CollectionUtil.newHashMap();
params = MapUtil.newHashMap();
}
params.put(SMS_CODE_PARAM_NAME, validateCode);
}

View File

@ -119,7 +119,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<roses.version>7.1.3</roses.version>
<hutool.version>5.4.4</hutool.version>
<hutool.version>5.7.6</hutool.version>
<fastjson.version>1.2.74</fastjson.version>
<lombok.versin>1.18.14</lombok.versin>
<mp.version>3.4.0</mp.version>