Bean named 'redisTemplate' is expected to be of type 'org.springframework.data.redis.core.StringRedisTemplate' but was actually of type 'org.springframework.data.redis.core.RedisTemplate'
这个错误原因是:@Resource是默认取字段名进行按照名称注入
所以这里不能用redisTemplate,只能用stringRedisTemplate,即
版权声明:本文为crazy1013原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。