Description:
Field redisTemplate in com.blog.utils.RedisUtil required a bean of type 'org.springframework.data.redis.core.RedisTemplate' that could not be found.
找半天没找到原因
搜索了,发现
@Autowired
private RedisTemplate<String, Object> redisTemplate;
应该写为
@Resource
private RedisTemplate<String, Object> redisTemplate;
然后能运行了...