1.导入Redis依赖
org.springframework.boot spring-boot-starter-data-redis-reactive org.apache.commons commons-pool2 2.6.0
2.yml中配置Redis:
server:
port: 8080
spring:
redis:
host: 192.168.1.107
port: 6379
database: 0
jedis:
pool:
max-active: 8
max-wait: -1
max-idle: 8