采用lettuce作为客户端连接redis的pom配置文件:
<!-- spring-redis -->
<!-- https://mvnrepository.com/artifact/org.springframework.data/spring-data-redis -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>1.8.0.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/biz.paluch.redis/lettuce -->
<dependency>
<groupId>biz.paluch.redis</groupId>
<artifactId>lettuce</artifactId>
<version>4.2.2.Final</version>
</dependency>
或者
<!-- spring-redis -->
<!-- https://mvnrepository.com/artifact/org.springframework.data/spring-data-redis -->
<dependency>

本文介绍了如何在项目中配置Lettuce客户端以连接Redis。提供了两种不同的Maven依赖配置方法,并推荐使用包含lettuce-core的配置方案。该方案利用Netty实现连接复用,提供更为高效稳定的Redis连接。

3800

被折叠的 条评论
为什么被折叠?



