开门见山,错误原因是:自己的redis服务器,我们只设置了redis后台运行,而没有把redis服务设置为系统服务,也就是没有设置redis开机自启;所以,自己不注意重启了redis所在的服务器,而忘记了开启redis服务;所以,会出现redis连不上的情况;
为什么写本篇博客?:在写【附加:Mybatis传递多个参数时的处理策略;(包括:是否使用@Param注解,parameterType=“”的使用,使用Map或者List接收;)】的时候,遇到了redis连不上的情况,报了如下的错误:
org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 192.168.67.134:6380