File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed
redis/src/main/java/io/kimmking/cache/redission Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ port 26379
88user default on nopass ~* +@all
99dir "/Users/kimmking/kimmking/JavaCourseCodes/08cache/ha/conf"
1010sentinel config-epoch mymaster 5
11- sentinel leader-epoch mymaster 5
11+ sentinel leader-epoch mymaster 6
1212sentinel known-replica mymaster 127.0.0.1 6379
1313sentinel known-sentinel mymaster 127.0.0.1 26380 8d992c54df8f8677b0b345825f61fb733c73d14d
14- sentinel current-epoch 5
14+ sentinel current-epoch 6
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ port 26380
88user default on nopass ~* +@all
99dir "/Users/kimmking/kimmking/JavaCourseCodes/08cache/ha/conf"
1010sentinel config-epoch mymaster 5
11- sentinel leader-epoch mymaster 5
11+ sentinel leader-epoch mymaster 6
1212sentinel known-replica mymaster 127.0.0.1 6379
1313sentinel known-sentinel mymaster 127.0.0.1 26379 8d992c54df8f8677b0b345825f61fb733c73d14c
14- sentinel current-epoch 5
14+ sentinel current-epoch 6
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public class RedissionDemo{
1313@ SneakyThrows
1414public static void main (String [] args ){
1515Config config = new Config ();
16- config .useSingleServer ().setAddress ("redis://127.0.0.1:6379 " );
16+ config .useSingleServer ().setAddress ("redis://127.0.0.1:6380 " );
1717//config.useSingleServer().setPassword("");
1818
1919final RedissonClient client = Redisson .create (config );
@@ -38,6 +38,7 @@ public static void main(String[] args){
3838Thread .sleep (2000 );
3939System .out .println (rmap .get ("rkey:10" ));
4040 }
41+
4142 }
4243
4344// 可参阅:https://www.jianshu.com/p/47fd7f86c848
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ public class RedissionDemo1{
1010
1111public static void main (String [] args ){
1212Config config = new Config ();
13- config .useSingleServer ().setAddress ("redis://127.0.0.1:6379 " );
13+ config .useSingleServer ().setAddress ("redis://127.0.0.1:6380 " );
1414//config.useSingleServer().setPassword("");
1515
1616final RedissonClient client = Redisson .create (config );
You can’t perform that action at this time.
0 commit comments