引入依赖 采用commons-pool2 作为redis连接池 <!-- redis starter --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId>