请叫我头头哥

您可以考虑给头头来个小小的打赏以资鼓励,您的肯定将是我最大的动力。thx.

微信打赏

微信账号 i7toutou

支付宝打赏

支付宝账号 datou431@qq.com

Field redisTemplate in xxxxxx required a bean of type 'org.springframework.data.redis.core.RedisTemplate' that could not be found.

***************************
APPLICATION FAILED TO START
***************************

Description:

Field redisTemplate in com.demo.service.UserServiceImpl required a bean of type 'org.springframework.data.redis.core.RedisTemplate' that could not be found.
- Bean method 'stringRedisTemplate' in 'RedisAutoConfiguration' not loaded because @ConditionalOnMissingBean (types: org.springframework.data.redis.core.StringRedisTemplate; SearchStrategy: all) found beans of type 'org.springframework.data.redis.core.StringRedisTemplate' template


Action:

Consider revisiting the entries above or defining a bean of type 'org.springframework.data.redis.core.RedisTemplate' in your configuration.

Field redisTemplate in xxxxxx required a bean of type 'org.springframework.data.redis.core.RedisTemplate' that could not be found.

点击查看大图

通过上面的Description信息可以看出来,报错在UserServiceImpl 中,具体UserServiceImpl 代码如下图所示:

Field redisTemplate in xxxxxx required a bean of type 'org.springframework.data.redis.core.RedisTemplate' that could not be found.

解决方案:

RedisTemplate<String, List> redisTemplate 的注解 @Autowired 更换为 @Resource

再次运行,问题搞定。

你可能感兴趣的文章:

posted @ 2019-07-06 22:16  请叫我头头哥  阅读(...)  评论(...编辑  收藏
//Setting ico for cnblogs