spring:
redis:
.sentinel:
master: mymaster
nodes: 192.168.140.128:5000,192.168.140.128:6000
username: sentinel-user
password: sentinel@123
@Bean
public LettuceClientConfigurationBuilderCustomizer
lettuceClientConfigurationBuilderCustomizer() {
return p -> p.readFrom(ReadFrom.SLAVE_PREFERRED);
}
Posted in: redis
Comments are closed.