2020
09-29
09-29
SpringBoot连接Redis2种模式解析
一、引入pom<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-redis</artifactId></dependency>二、配置YML文件(二选一)1.sentinel模式server:port:80spring:redis:sentinel:nodes:192.168.0.106:26379,192.168.0.106:26380,192.168.0.106:26381//哨兵的ip和端口master:mymaster//这个就是哨兵配置文件中sentinelmonitormymaster192.168...
继续阅读 >