一、问题描述

在注入RedisTemplate报错

二、解决办法

2.1使用@Resource注入

    @Resourceprivate RedisTemplate<String, Object> redisTemplate;

2.2使用@Autowired

    @Autowiredprivate RedisTemplate redisTemplate;

至于为什么这样做,可以参考如下链接:
https://blog.csdn.net/weixin_40910372/article/details/103832586
https://blog.csdn.net/gududedabai/article/details/100660916
更多资料,欢迎关注

Redis报错Field redisTemplate in xxx required a bean of type ‘org.x.RedisTemplate‘that can not be foud相关推荐

  1. SpringBoot报错Field userService in XXTestController required a bean of type 'XX' that could not be...

    运行SpringBoot项目报错Field userService in XXXTestController required a bean of type 'XXX' that could not ...

  2. springboot项目启动报错Field Mapper in ServiceImpl required a bean of type ‘Mapper‘ that could not be found

    1.报错: Error starting ApplicationContext. To display the conditions report re-run your application wi ...

  3. SpringBoot启动报错Field service in XXX required a bean of XXX that could not be found.

    原始错误: demo.printing.yinbao.controller.YinbaoSpecificationController中的现场服务需要找不到类型为" demo.printin ...

  4. springboot 配置RedisTemplate 报:Field redisTemplate in XXX required a bean of type 'org.springframework

    错误信息如下: Error starting ApplicationContext. To display the conditions report re-run your application ...

  5. 显示mapper找不到:Field xxxMapper in xxx required a bean of type ‘xxxMapper‘ that could not be found

    Field flowerMapper in cn.clearnight.flower.service.impl.FlowerServiceImpl required a bean of type 'c ...

  6. 【踩坑专栏】Field xxFeignClient in xxx required a bean of type ‘xxx.XXFeignClient‘ that could not be found

    首先我的feignClient上已标注解@FeignClient,出现这个问题的原因是因为启动类需要注解@EnableFeignClients(basePackages = "xx.xx.x ...

  7. 解决:Field xxClient in XXX required a bean of type 'XXX' that could not be found

    使用@Autowired导入client时报如下错误: 找不到这个client,于是到启动类里观察 @EnableFeignClients("")配置路径,发现果然不对: 修改后问 ...

  8. 报错Field Mapper in xxx.xxxServiceImpl required a bean of type ‘dao.xxxMapper‘ that could not be found

    报错Field Mapper in xxx.xxxServiceImpl required a bean of type 'dao.xxxMapper' that could not be found ...

  9. springboot使用junit单元测试是发生报错 Field taskUtils in com.xxx.xxx.xxxx.xxx required a bean of type 'xxx.xxx.

    使用junit单元测试mybatis时发生如下错误 Error starting ApplicationContext. To display the conditions report re-run ...

最新文章

  1. “机器学习还是很难用!”
  2. 多阶段构建Docker镜像
  3. linux ns级定时器_linux用户空间获得ns纳秒级时间示例
  4. Makefile学习(三)[第二版]
  5. 3.9 训练一个 Softmax 分类器
  6. python秒表代码_斌哥教你自制千分秒表(键盘控制)
  7. [Swust OJ 166]--方程的解数(hash法)
  8. 和jwt应用场景_一文了解web无状态会话token技术JWT
  9. android迷宫源代码,迷宫 c++源代码(Maze c++ source code).doc
  10. 《统计学习方法》——决策树
  11. Vue 移动端跳到手机拨打电话界面的几种方法
  12. vue上传图片时,console.log()图片信息遇到的坑
  13. uniapp 引入第三方包发起网络数据请求
  14. python树莓派_树莓派python
  15. AirTrest连接模拟器和安卓手机
  16. 思科模拟器 --- 扩展IP访问控制列表配置
  17. libxml2的参考手册
  18. Java 在PPT中添加文本水印的简易方法(单一/平铺水印)
  19. onlyoffice文件服务器,onlyoffice踩坑记录
  20. windows、Linux、VxWorks 下errno含义

热门文章

  1. 魔兽世界服务器排队状态app,魔兽世界服务器排队插队软件-魔兽世界7.0服务器免排队辅助预约1.2.01[预约]-乐游网游戏...
  2. 无线互联 嵌入式系统设计的新挑战
  3. SpringCloud第九章(消息驱动Strem和RabbitMQ)
  4. 模仿360安全卫士项目笔记1
  5. 十进制转二进制和十六进制 条件码标志和乘法指令
  6. 路由器NAT超时设置引起的APP的TCP长连接丢失
  7. 做海产品怎么引流?如何推广自己的海鲜产品?
  8. 一图get面向物联网边缘计算的第四代英特尔至强可扩展处理器
  9. FXDD存取款,1-5工作日能够到国内个人银行账户
  10. jenkins pipeline script部署实例和回滚实例