基本环境介绍 1.windows10,防火墙已关闭, 2.连接windos本地Redis3.0.504和虚拟机redis都有延迟 springboot的redis配置

spring.redis.host=localhost

spring.redis.port=6379

使用的maven依赖 1.springboot org.springframework.boot spring-boot-starter-parent 2.1.3.RELEASE 2.redis org.springframework.boot spring-boot-starter-data-redis

@Autowired private RedisTemplate RedisTemplate;

//校验验证码是否正确 String redisKey = "CHECK_CODE_" + mobile; String value = this.RedisTemplate.opsForValue().get(redisKey);//在这行的时候程序执行需要一分钟左右才能获取到redis存储的值

Comment From: yossigo

@Elgin-xj Please stick to English when discussing issues on this repository. I'm closing this as it's probably an environment / Spring Boot related problem but please feel free to re-open with additional information if you suspect there is a problem with redis-server.