All Downloads are FREE. Search and download functionalities are using the official Maven repository.

driven-adapter.redis-reactive.secret.redis-config.mustache Maven / Gradle / Ivy

Go to download

Gradle plugin to create a clean application in Java that already works, It follows our best practices!

There is a newer version: 3.20.10
Show newest version
package {{package}}.redis.config;

import co.com.bancolombia.secretsmanager.api.exceptions.SecretException;
import co.com.bancolombia.secretsmanager.api.GenericManagerAsync;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory;
import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;

@Configuration
public class RedisConfig {

    @Bean
    public RedisStandaloneConfiguration redisConfig(@Value("${aws.secretName}") String secret, GenericManagerAsync manager)
            throws SecretException {
        // Load secret here
        RedisStandaloneConfiguration configuration = new RedisStandaloneConfiguration();
        // Update values here
        return configuration;
    }

    @Bean
    public ReactiveRedisConnectionFactory redisConnectionFactory(RedisStandaloneConfiguration configuration) {
        return new LettuceConnectionFactory(configuration);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy