fix(uboot-common): 修改redis配置类动态配置db

This commit is contained in:
chuhang
2021-12-27 13:57:59 +08:00
parent 164c034d4c
commit 414a3a0c22
3 changed files with 67 additions and 5 deletions

View File

@ -19,6 +19,7 @@ import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.core.annotation.Order;
import org.springframework.data.redis.core.RedisTemplate;
@ -45,7 +46,9 @@ public class RequestShardValueAspect {
private KeyResolver keyResolver;
@Autowired
private ProcessService processService;
@Autowired
@Autowired(required = false)
@Qualifier("shardingRedisTemplate")
private RedisTemplate<String, Object> redisTemplate;