Когда я перезагружаю Redis cause
Java.util.concurrent.executionException: io.lettuce.core.rediscommandexecutionException: требуется аутентификация NOAUTH.
Почему это проблема
использовать Версия, подобная этому < /p>
@Configuration
public class RedisConfig {
@Autowired
private RedisProperties redisProperties;
@Bean(destroyMethod = "close")
public StatefulRedisConnection StatefulRedisConnection() {
RedisURI redisUri = RedisURI.builder().withPassword(redisProperties.getPassword())
.withSentinel(redisProperties.getSentinel().getNodes().get(0).split(":")[0],
Integer.valueOf(redisProperties.getSentinel().getNodes().get(0).split(":")[1]))
.withSentinelMasterId(redisProperties.getSentinel().getMaster())
.withDatabase(redisProperties.getDatabase()).build();
RedisClient redisClient = RedisClient.create(redisUri);
return redisClient.connect(new SerializedObjectCodec());
}
}
< /code>
public class CacheImpl implements Cache {
@Autowired
private StatefulRedisConnection connect;
public Boolean addCourseInfosCache() {
RedisAsyncCommands commands = connect.async();
// disable auto-flushing
commands.setAutoFlushCommands(false);
List
Подробнее здесь: https://stackoverflow.com/questions/652 ... eredis-sen
Аутентификация NOAUTH требуется Spring-Boot-Data-Redis+Sealrease Latuce+Redis sentinel ⇐ JAVA
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Аутентификация NOAUTH требуется Spring-Boot-Data-Redis+Sealrease Latuce+Redis sentinel
Anonymous » » в форуме JAVA - 0 Ответы
- 5 Просмотры
-
Последнее сообщение Anonymous
-