org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.
If you encounter this problem, first check whether the Redis service is started
When using springboot's
2.2.6.RELEASE version to connect to Redis, an error is reported at startup
The configuration file is as follows
The reason for the error is that no password was set for Redis when Redis was installed and configured.
Now to set the password, add it to the springboot configuration file
Find the Redis installation directory and find the
Add and modify the
Then go to the installation directory to find
config set requirepass "123456"
Finally, add the password to the configuration file:
spring.redis.host=127.0.0.1 spring.redis.port=6379 spring.redis.password=123456