Skip to content

Reference documentation shows usage of deprecated code #1964

Closed
@imbf

Description

@imbf

when looking at redis.adoc, I saw code like below.

@Configuration
class WriteToMasterReadFromReplicaConfiguration {

  @Bean
  public LettuceConnectionFactory redisConnectionFactory() {

    LettuceClientConfiguration clientConfig = LettuceClientConfiguration.builder()
      .readFrom(SLAVE_PREFERRED)
      .build();

    RedisStandaloneConfiguration serverConfig = new RedisStandaloneConfiguration("server", 6379);

    return new LettuceConnectionFactory(serverConfig, clientConfig);
  }
}

There is one issue in this code, which is that SLAVE_PREFERRED is deprecated

this has been changed to REPLICA_PREFERRED and i am going to modify this and send it as a PR to this repository

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions