springboot使用jedis(jedispool)、lettuce

  • Post author:
  • Post category:其他




一、pom.xml配置

<!-- redis lettuce客户端(已集成)、RedisTemplate客户端(已集成) -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- jedis客户端(需要额外引入) -->
<dependency>
    <groupId>redis.clients</groupId>
    <artifactId>jedis</artifactId>
    <version>3.2.0</version>
</dependency>

二、application.properties配置

spring.redis.host=10.1.1.100
spring.redis.password=Abcd@1234
spring.redis.port=6379
# jedis pool setting
spring.redis.jedis.pool.max-ac



版权声明:本文为shaoyuadmin原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。