commit:同步2.1版本

This commit is contained in:
Jerry
2021-12-16 21:51:40 +08:00
parent c76388f593
commit 7af7fe5dc2
553 changed files with 8366 additions and 4151 deletions

View File

@@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>common</artifactId>
<groupId>com.flow.demo</groupId>
<groupId>com.orangeforms</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -16,7 +16,7 @@
<dependencies>
<dependency>
<groupId>com.flow.demo</groupId>
<groupId>com.orangeforms</groupId>
<artifactId>common-core</artifactId>
<version>1.0.0</version>
</dependency>

View File

@@ -1,9 +1,9 @@
package com.flow.demo.common.redis.cache;
package com.orangeforms.common.redis.cache;
import com.alibaba.fastjson.JSON;
import com.flow.demo.common.core.cache.DictionaryCache;
import com.flow.demo.common.core.constant.ApplicationConstant;
import com.flow.demo.common.core.exception.RedisCacheAccessException;
import com.orangeforms.common.core.cache.DictionaryCache;
import com.orangeforms.common.core.constant.ApplicationConstant;
import com.orangeforms.common.core.exception.RedisCacheAccessException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.redisson.api.RMap;

View File

@@ -1,9 +1,9 @@
package com.flow.demo.common.redis.cache;
package com.orangeforms.common.redis.cache;
import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import com.flow.demo.common.core.constant.ApplicationConstant;
import com.flow.demo.common.core.exception.RedisCacheAccessException;
import com.orangeforms.common.core.constant.ApplicationConstant;
import com.orangeforms.common.core.exception.RedisCacheAccessException;
import com.google.common.collect.LinkedListMultimap;
import com.google.common.collect.Multimap;
import org.apache.commons.collections4.CollectionUtils;

View File

@@ -1,4 +1,4 @@
package com.flow.demo.common.redis.cache;
package com.orangeforms.common.redis.cache;
import com.google.common.collect.Maps;
import org.redisson.api.RedissonClient;

View File

@@ -1,6 +1,6 @@
package com.flow.demo.common.redis.cache;
package com.orangeforms.common.redis.cache;
import com.flow.demo.common.core.object.TokenData;
import com.orangeforms.common.core.object.TokenData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;

View File

@@ -1,8 +1,8 @@
package com.flow.demo.common.redis.config;
package com.orangeforms.common.redis.config;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil;
import com.flow.demo.common.core.exception.InvalidRedisModeException;
import com.orangeforms.common.core.exception.InvalidRedisModeException;
import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
@@ -69,7 +69,8 @@ public class RedissonConfig {
.setPassword(password)
.addNodeAddress(clusterAddresses)
.setConnectTimeout(timeout)
.setMasterConnectionPoolSize(poolSize);
.setMasterConnectionPoolSize(poolSize)
.setMasterConnectionMinimumIdleSize(minIdle);
} else if ("sentinel".equals(mode)) {
String[] sentinelAddresses = StrUtil.splitToArray(address, ',');
config.setLockWatchdogTimeout(lockWatchdogTimeout)
@@ -78,7 +79,8 @@ public class RedissonConfig {
.setMasterName(masterName)
.addSentinelAddress(sentinelAddresses)
.setConnectTimeout(timeout)
.setMasterConnectionPoolSize(poolSize);
.setMasterConnectionPoolSize(poolSize)
.setMasterConnectionMinimumIdleSize(minIdle);
} else if ("master-slave".equals(mode)) {
String[] masterSlaveAddresses = StrUtil.splitToArray(address, ',');
if (masterSlaveAddresses.length == 1) {
@@ -93,7 +95,8 @@ public class RedissonConfig {
.setMasterAddress(masterSlaveAddresses[0])
.addSlaveAddress(slaveAddresses)
.setConnectTimeout(timeout)
.setMasterConnectionPoolSize(poolSize);
.setMasterConnectionPoolSize(poolSize)
.setMasterConnectionMinimumIdleSize(minIdle);
} else {
throw new InvalidRedisModeException(mode);
}

View File

@@ -1,2 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.flow.demo.common.redis.config.RedissonConfig
com.orangeforms.common.redis.config.RedissonConfig