mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 18:46:36 +08:00
commit:同步2.1版本
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.flow.demo.common.redis.config.RedissonConfig
|
||||
com.orangeforms.common.redis.config.RedissonConfig
|
||||
Reference in New Issue
Block a user