当前位置:   article > 正文

required a bean of type ‘org.springframework.data.redis.core.RedisTemplate‘ that could not be found._required a bean of type 'org.springframework.data.

required a bean of type 'org.springframework.data.redis.core.redistemplate

1、报错信息如下:

  1. ***************************
  2. APPLICATION FAILED TO START
  3. ***************************
  4. Description:
  5. Field redisTemplate in com.xialj.demoend.service.impl.UploadServiceImpl required a bean of type 'org.springframework.data.redis.core.RedisTemplate' that could not be found.
  6. The injection point has the following annotations:
  7. - @org.springframework.beans.factory.annotation.Autowired(required=true)
  8. Action:
  9. Consider defining a bean of type 'org.springframework.data.redis.core.RedisTemplate' in your configuration.

2、解决方案:

将 :

  1. @Autowired
  2. private RedisTemplate<String, Object> redisTemplate;

改为:

  1. @Resource
  2. private RedisTemplate<String, Object> redisTemplate;

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/125773?site
推荐阅读
相关标签
  

闽ICP备14008679号