SpringBoot-集成 Redis
1,引入 jar 包依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
</dependency>
2,配置连接参数
spring.redis.database=0
spring.redis.host=localhost
spring.redis.port=6379
spring.redis.timeout=0
spring.redis.jedis.pool.max-wait=1000
spring.redis.jedis.pool.max-idle=100
spring.redis.jedis.pool.max-total=2000
3,JedisPool 连接池配置