SpringBoot整合Redis

一、引入依赖包


<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>

二、添加配置


spring.redis.database=1
spring.redis.host=lyhost
spring.redis.port=6379
spring.redis.password=123456
spring.redis.pool.max-idle=8
spring.redis.pool.min-idle=0
spring.redis.pool.max-active=8
spring.redis.pool.max-wait=-1
spring.redis.timeout=5000
posted @ 2019-01-05 16:28  刘莹小西瓜  阅读(121)  评论(0编辑  收藏  举报