
driven-adapter.redis-reactive.secret.redis-config.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scaffold-clean-architecture Show documentation
Show all versions of scaffold-clean-architecture Show documentation
Gradle plugin to create a clean application in Java that already works, It follows our best practices!
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