Files
spring-data-examples/redis/cluster-sentinel
Oliver Gierke 99d1597756 #155 - Upgraded to Spring Boot 1.4 M1.
Switched to renamed Redis starter POM.

Removed invalid @Transactional annotation from projections example in MongoDB.

Added Mark Paluch as contributor in the root POM.
2016-02-27 12:30:31 +01:00
..
2016-02-27 12:30:31 +01:00

Spring Data Redis - Sentinel and Cluster Examples

This project contains samples of Sentinel and CLuster specific features of Spring Data Redis.

Support for Sentinel

@Configuration
public class RedisSentinelApplicationConfig {

	static final RedisSentinelConfiguration SENTINEL_CONFIG = new RedisSentinelConfiguration().master("mymaster") //
			.sentinel("localhost", 26379) //
			.sentinel("localhost", 26380) //
			.sentinel("localhost", 26381);

	@Bean
	public RedisConnectionFactory connectionFactory() {
		return new JedisConnectionFactory(sentinelConfig());
	}

	@Bean
	public RedisSentinelConfiguration sentinelConfig() {
		return SENTINEL_CONFIG;
	}

}