File tree Expand file tree Collapse file tree 7 files changed +39
-34
lines changed
java/example/springdata/redis/sentinel Expand file tree Collapse file tree 7 files changed +39
-34
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ We have separate folders for the samples of individual modules:
38
38
39
39
* ` example ` - Example for basic Spring Data Redis setup.
40
40
* ` cluster ` - Example for Redis Cluster support.
41
- * ` cluster- sentinel` - Example for Redis Sentinel support.
41
+ * ` sentinel ` - Example for Redis Sentinel support.
42
42
* ` repository ` - Example demonstrating Spring Data repository abstraction on top of Redis.
43
43
44
44
## Spring Data Elasticsearch
Original file line number Diff line number Diff line change 1
- # Spring Data Redis - Sentinel Examples
1
+ # Spring Data Redis Example
2
2
3
- This project contains samples of Sentinel specific features of Spring Data Redis.
4
-
5
- ## Support for Sentinel
6
-
7
- ``` java
8
- @Configuration
9
- public class RedisSentinelApplicationConfig {
10
-
11
- static final RedisSentinelConfiguration SENTINEL_CONFIG = new RedisSentinelConfiguration (). master(" mymaster" ) //
12
- .sentinel(" localhost" , 26379 ) //
13
- .sentinel(" localhost" , 26380 ) //
14
- .sentinel(" localhost" , 26381 );
15
-
16
- @Bean
17
- public RedisConnectionFactory connectionFactory () {
18
- return new JedisConnectionFactory (sentinelConfig());
19
- }
20
-
21
- @Bean
22
- public RedisSentinelConfiguration sentinelConfig () {
23
- return SENTINEL_CONFIG ;
24
- }
25
-
26
- }
27
- ```
3
+ The this example was named a bit misleading as ` cluster-sentinel ` is a mix of Redis Cluster and Redis Sentinel.
28
4
5
+ Find dedicated examples here: [ Redis Cluster] ( ../cluster ) and [ Redis Sentinel] ( ../sentinel ) .
Original file line number Diff line number Diff line change 16
16
<description >Sample projects for Spring Data Redis</description >
17
17
18
18
<modules >
19
- <module >util</module >
20
- <module >cluster-sentinel</module >
21
- <module >example</module >
22
19
<module >cluster</module >
23
- <module >repositories </module >
20
+ <module >example </module >
24
21
<module >reactive</module >
22
+ <module >repositories</module >
23
+ <module >sentinel</module >
24
+ <module >util</module >
25
25
</modules >
26
26
27
27
<dependencies >
Original file line number Diff line number Diff line change
1
+ # Spring Data Redis - Sentinel Examples
2
+
3
+ This project contains samples of Sentinel specific features of Spring Data Redis.
4
+
5
+ ## Support for Sentinel
6
+
7
+ ``` java
8
+ @Configuration
9
+ public class RedisSentinelApplicationConfig {
10
+
11
+ static final RedisSentinelConfiguration SENTINEL_CONFIG = new RedisSentinelConfiguration (). master(" mymaster" ) //
12
+ .sentinel(" localhost" , 26379 ) //
13
+ .sentinel(" localhost" , 26380 ) //
14
+ .sentinel(" localhost" , 26381 );
15
+
16
+ @Bean
17
+ public RedisConnectionFactory connectionFactory () {
18
+ return new JedisConnectionFactory (sentinelConfig());
19
+ }
20
+
21
+ @Bean
22
+ public RedisSentinelConfiguration sentinelConfig () {
23
+ return SENTINEL_CONFIG ;
24
+ }
25
+
26
+ }
27
+ ```
28
+
Original file line number Diff line number Diff line change 2
2
xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
3
3
<modelVersion >4.0.0</modelVersion >
4
4
5
- <artifactId >spring-data-redis-cluster- sentinel-example</artifactId >
6
- <name >Spring Data Redis - Cluster/ Sentinel Example</name >
5
+ <artifactId >spring-data-redis-sentinel-example</artifactId >
6
+ <name >Spring Data Redis - Sentinel Example</name >
7
7
8
8
<parent >
9
9
<groupId >org.springframework.data.examples</groupId >
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2014-2016 the original author or authors.
2
+ * Copyright 2014-2017 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments