org.springframework.dao.InvalidDataAccessApiUsageException: NOAUTH Authentication required.; nested

启动项目时出现如下错误:

org.springframework.dao.InvalidDataAccessApiUsageException: NOAUTH Authentication required.; nested exception is redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required.
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:64)
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:41)
at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:44)
at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:42)
at org.springframework.data.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:142)
at org.springframework.data.redis.connection.jedis.JedisStringCommands.convertJedisAccessException(JedisStringCommands.java:815)
at org.springframework.data.redis.connection.jedis.JedisStringCommands.set(JedisStringCommands.java:145)
at org.springframework.data.redis.connection.DefaultedRedisConnection.set(DefaultedRedisConnection.java:274)
at org.springframework.data.redis.core.DefaultValueOperations 3. i n R e d i s ( D e f a u l t V a l u e O p e r a t i o n s . j a v a : 240 ) a t o r g . s p r i n g f r a m e w o r k . d a t a . r e d i s . c o r e . A b s t r a c t O p e r a t i o n s 3.inRedis(DefaultValueOperations.java:240) at org.springframework.data.redis.core.AbstractOperations 3.inRedis(DefaultValueOperations.java:240)atorg.springframework.data.redis.core.AbstractOperationsValueDeserializingRedisCallback.doInRedis(AbstractOperations.java:59)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:224)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:184)
at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:95)
at org.springframework.data.redis.core.DefaultValueOperations.set(DefaultValueOperations.java:236)
at com.RedisService.setList(RedisService.java:47)
at com.Main.main(Main.java:14)
Caused by: redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required.
at redis.clients.jedis.Protocol.processError(Protocol.java:127)
at redis.clients.jedis.Protocol.process(Protocol.java:161)
at redis.clients.jedis.Protocol.read(Protocol.java:215)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)
at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:239)
at redis.clients.jedis.BinaryJedis.set(BinaryJedis.java:211)
at org.springframework.data.redis.connection.jedis.JedisStringCommands.set(JedisStringCommands.java:143)
… 9 more

报错原因是因为我的Redis设置了密码,但是我在配置的时候没有配置密码。加上密码即可

你可能感兴趣的:(Redis)