|
|
@@ -28,6 +28,9 @@ public class IdempotentAutoConfiguration {
|
|
|
@Value("${spring.data.redis.host}")
|
|
|
private String host;
|
|
|
|
|
|
+ @Value("${spring.data.redis.password}")
|
|
|
+ private String password;
|
|
|
+
|
|
|
/**
|
|
|
* 切面 拦截处理所有 @Idempotent
|
|
|
* @return Aspect
|
|
|
@@ -52,6 +55,7 @@ public class IdempotentAutoConfiguration {
|
|
|
public RedissonClient redissonClient() {
|
|
|
Config config = new Config();
|
|
|
config.useSingleServer().setAddress("redis://"+host+":6379");
|
|
|
+ config.useSingleServer().setPassword(password);
|
|
|
return Redisson.create(config);
|
|
|
}
|
|
|
|