Interface RedisConfig


@ConfigMapping(prefix="quarkus.redis") @ConfigRoot(phase=RUN_TIME) public interface RedisConfig
  • Field Details

  • Method Details

    • clients

      @WithParentName @WithDefaults @WithUnnamedKey("<default>") @ConfigDocMapKey("redis-client-name") @WithUnnamedKey("<default>") Map<String,RedisClientConfig> clients()
      Configures the Redis clients.

      The default client does not have a name, and it is configured as:

       quarkus.redis.hosts = redis://localhost:6379
       
      And then use Inject to inject the client:
       @Inject
       RedisAPI redis;
       

      Named clients must be identified to select the right client:

       quarkus.redis.client1.hosts = redis://localhost:6379
       quarkus.redis.client2.hosts = redis://localhost:6380
       
      And then use the RedisClientName annotation to select any of the beans: And inject the client:
       @RedisClientName("client1")
       @Inject
       RedisAPI redis;
       
    • isDefaultClient

      static boolean isDefaultClient(String name)
    • getPropertyName

      static String getPropertyName(String name, String attribute)