Caused by: org.redisson.client.RedisException: ERR Client sent AUTH, but no password is set. channel
Posted 有时间指导毕业设计
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Caused by: org.redisson.client.RedisException: ERR Client sent AUTH, but no password is set. channel相关的知识,希望对你有一定的参考价值。
package com.qfedu.fmmall.service.config;/*
**
*@author SmallMonkey
*@Date 2022/12/23 12:51
*
*
**/
import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class RedissonConfig
// @Value("$redisson.addr.singleAddr.host")
@Value("$spring.redis.host")
private String host;
@Value("$redisson.addr.singleAddr.password")
// @Value("$spring.redis.password")
private String password;
@Value("$redisson.addr.singleAddr.port")
// @Value("$spring.redis.port")
private int port;
@Value("$redisson.addr.singleAddr.database")
// @Value("$spring.redis.database")
private int database;
@Bean
public RedissonClient redissonClient()
Config config = new Config();
config.useSingleServer()
.setAddress("redis://" + host + ":" + port)
.setPassword(password)
.setDatabase(database);
return Redisson.create(config);
由于你是没有密码的,直接把 .setPassword(password)方法去掉
以上是关于Caused by: org.redisson.client.RedisException: ERR Client sent AUTH, but no password is set. channel的主要内容,如果未能解决你的问题,请参考以下文章
Mathematical Problems Caused by CCD
Caused by: java.lang.NoClassDefFoundError:
异常Caused by: java.lang.ClassNotFoundException: org.springframework.dao.DataIntegrityViolationExcep