<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency>
spring: redis: host: xxx port: 6379 client-type: lettuce
@Autowired RedisConnectionFactory redisConnectionFactory; @Test public void test6(){ System.out.println(redisConnectionFactory); }
<dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> </dependency>