🔨 修改无缓存配置.
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
<artifactId>netty-all</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- test redis noRedis -->
|
||||
<!-- test redis MockRedis -->
|
||||
<dependency>
|
||||
<groupId>com.github.fppt</groupId>
|
||||
<artifactId>jedis-mock</artifactId>
|
||||
|
||||
@@ -38,17 +38,17 @@ import java.net.InetAddress;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* noRedis 配置
|
||||
* MockRedis
|
||||
* 仅用于本地调试无 redis 的情况
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2024/12/26 10:02
|
||||
*/
|
||||
@ConditionalOnProperty(value = "no.redis", havingValue = "true")
|
||||
@ConditionalOnProperty(value = "spring.redis.mock", havingValue = "true")
|
||||
@AutoConfiguration
|
||||
@AutoConfigureOrder(AutoConfigureOrderConst.FRAMEWORK_REDIS - 10)
|
||||
public class OrionNoRedisAutoConfiguration {
|
||||
public class OrionMockRedisAutoConfiguration {
|
||||
|
||||
/**
|
||||
* @return mocked redis server
|
||||
@@ -32,9 +32,9 @@
|
||||
"defaultValue": "1"
|
||||
},
|
||||
{
|
||||
"name": "no.redis",
|
||||
"name": "spring.redis.mock",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "是否无 redis.",
|
||||
"description": "是否使用 mock redis, 一般用于无 redis 调试时使用.",
|
||||
"defaultValue": false
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
org.dromara.visor.framework.redis.configuration.OrionNoRedisAutoConfiguration
|
||||
org.dromara.visor.framework.redis.configuration.OrionMockRedisAutoConfiguration
|
||||
org.dromara.visor.framework.redis.configuration.OrionRedisAutoConfiguration
|
||||
org.dromara.visor.framework.redis.configuration.OrionCacheAutoConfiguration
|
||||
@@ -15,6 +15,7 @@ spring:
|
||||
password: ${REDIS_PASSWORD:Data@123456}
|
||||
database: ${REDIS_DATABASE:10}
|
||||
data-version: ${REDIS_DATA_VERSION:1}
|
||||
mock: false
|
||||
redisson:
|
||||
threads: 2
|
||||
netty-threads: 2
|
||||
@@ -42,6 +43,3 @@ mybatis-plus:
|
||||
configuration:
|
||||
# 日志打印
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
no:
|
||||
redis: false
|
||||
|
||||
Reference in New Issue
Block a user