mirror of
https://github.com/yangzongzhuan/RuoYi-Cloud.git
synced 2025-09-03 19:27:59 +00:00
参数管理支持缓存操作
This commit is contained in:
@@ -71,26 +71,6 @@ public class Constants
|
||||
*/
|
||||
public static final String IS_ASC = "isAsc";
|
||||
|
||||
/**
|
||||
* 参数管理 cache name
|
||||
*/
|
||||
public static final String SYS_CONFIG_CACHE = "sys-config";
|
||||
|
||||
/**
|
||||
* 参数管理 cache key
|
||||
*/
|
||||
public static final String SYS_CONFIG_KEY = "sys_config:";
|
||||
|
||||
/**
|
||||
* 字典管理 cache name
|
||||
*/
|
||||
public static final String SYS_DICT_CACHE = "sys-dict";
|
||||
|
||||
/**
|
||||
* 字典管理 cache key
|
||||
*/
|
||||
public static final String SYS_DICT_KEY = "sys_dict:";
|
||||
|
||||
/**
|
||||
* 验证码 redis key
|
||||
*/
|
||||
@@ -101,6 +81,11 @@ public class Constants
|
||||
*/
|
||||
public static final Integer CAPTCHA_EXPIRATION = 2;
|
||||
|
||||
/**
|
||||
* 参数管理 cache key
|
||||
*/
|
||||
public static final String SYS_CONFIG_KEY = "sys_config:";
|
||||
|
||||
/**
|
||||
* 资源映射路径 前缀
|
||||
*/
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.common.redis.configure;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -21,6 +22,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
public class RedisConfig extends CachingConfigurerSupport
|
||||
{
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(name = "redisTemplate")
|
||||
@SuppressWarnings(value = { "unchecked", "rawtypes", "deprecation" })
|
||||
public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory connectionFactory)
|
||||
{
|
||||
|
@@ -1,4 +1,5 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.ruoyi.common.redis.configure.RedisConfig,\
|
||||
com.ruoyi.common.redis.service.RedisService
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user