需要 spring-boot-starter-data-redis-reactive 2.4+ NOAUTH 身份验证?

时间:2021-05-21 12:34:56

标签: spring-boot redis

我的redis服务器在腾讯云 当我使用 spring boot data redis 2.3 时,它可以工作,但是当我使用 2.4+ 时,它总是显示错误“需要 NOAUTH 身份验证”。 有人可以帮忙吗?

spring:
  jackson:
    time-zone: GMT+8
    date-format: yyyy-MM-dd HH:mm:ss
  redis:
    host: 10.134.47.164
    password: xxx
    port: 6380
@RestController
public class IndexController {
    @Resource
    private ReactiveRedisTemplate<String, String> reactiveRedisTemplate;


    @GetMapping
    public Mono<String> index() {
        reactiveRedisTemplate.opsForValue().set("aaa", "bbb");

        return reactiveRedisTemplate.opsForValue().get("aaa");
    }


}

enter image description here

但是当我更改为 sspring-boot-starter-data-redis-reactive 2.3 时,它起作用了! 为什么?

0 个答案:

没有答案