java 对 Redis 的读写
依赖包: jedis.jar
maven 下:
- <!-- https://mvnrepository.com/artifact/Redis.clients/jedis -->
- <dependency>
- <groupId>
- Redis.clients
- </groupId>
- <artifactId>
- jedis
- </artifactId>
- <version>
- 2.9.0
- </version>
- </dependency>
spring 集成 Redis 的详解:
Redis 集群模式: 参考: Spring+SpringMVC 做 Redis 集群 (Sentinel 模式)
需要再加上下面的依赖 ---
- <dependency>
- <groupId>
- org.springframework.data
- </groupId>
- <artifactId>
- spring-data-Redis
- </artifactId>
- <version>
- 1.5.2.RELEASE
- </version>
- </dependency>
来源: http://www.bubuko.com/infodetail-2774952.html