十一.Redis 的 Java 客户端 Jedis 和 SpringBoot 整合 Redis
4)SpringBoot 整合 redis:
- 1.pom:
<!--Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!--spring 2.x 集成redis ,所需 common-pool2-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.6.0</version>
</dependency>
- 2.yml:
- 3.添加 Redis 配置类:
- 4.测试:
十二.Redis 6 新功能
1)ACL:
2)IO 多线程:
3)工具支持 Cluster:
4)Redis 新功能持续关注:
十三.Redis 6 新数据类型
1)Bitmaps
a:简介:
b:命令:
2)HyperLogLog
3)Geospatial
a:简介:
b:命令:
- 1.添加:
- 2.获取:
- 3.获取两个位置,直线距离:
- 4.以给定的经纬度为中心,找出某一半径内的元素: