錯誤提示:
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set
大概意思是:redis發送了一個AUTH請求,但是redis並沒有設置密碼
-------------------------------------------------------------------------------------------------------
應爲我的redis沒有密碼,但是我寫了password,所以將password移除就好了
我的redis配置:
spring:
# 配置數據源
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/my_shiro?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
username: root
password: root
type: com.alibaba.druid.pool.DruidDataSource
# Redis數據源
redis:
host: 127.0.0.1
port: 6379
timeout: 6000
database: 0
password:
jedis:
pool:
max-active: 1000 # 連接池最大連接數(使用負值表示沒有限制)
max-wait: -1 # 連接池最大阻塞等待時間(使用負值表示沒有限制)
max-idle: 10 # 連接池中的最大空閒連接
min-idle: 5 # 連接池中的最小空閒連接