当前位置: 首页 > news >正文

Redis注入中出现的问题

Redis注入中出现的问题

出现的问题

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-08-23 16:38:42.294 ERROR 32136 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : ***************************
APPLICATION FAILED TO START
***************************Description:Field redisTemplate in com.lxz.gateway.util.RedisUtil required a bean of type 'org.springframework.data.redis.core.RedisTemplate' that could not be found.The injection point has the following annotations:- @org.springframework.beans.factory.annotation.Autowired(required=true)Action:Consider defining a bean of type 'org.springframework.data.redis.core.RedisTemplate' in your configuration.

    @Resourceprivate RedisTemplate<String, Object> redisTemplate;

解决的方式就是在导入RedisTemplate的地方,由原先的@Autowired变成@Resource就可以了。

灵感来自于Field redisTemplate in ... required a bean of type ...RedisTemplate' that could not be found._CrazySnail_x的博客-CSDN博客

http://www.lryc.cn/news/137373.html

相关文章:

  • 机器学习实战之模型的解释性:Scikit-Learn的SHAP和LIME库详解
  • 【网络安全】防火墙知识点全面图解(二)
  • 【计算机视觉 | 目标检测】arxiv 计算机视觉关于目标检测的学术速递(8 月 14 日论文合集)
  • 自学设计模式(类图、设计原则、单例模式 - 饿汉/懒汉)
  • python爬虫10:selenium库
  • c++ java rgb与nv21互转
  • 多视图聚类(multi-view clustering)简介
  • wazhu配置以及漏洞复现
  • javaweb项目部署linux服务器遇到的问题
  • 【数据结构OJ题】环形链表
  • PySpark-核心编程
  • vue 在IOS移动端中 windon.open 等跳转外部链接后,返回不触发vue生命周期、mounted等相关事件-解决方法
  • 股票预测和使用LSTM(长期-短期-记忆)的预测
  • Docker搭建个人网盘、私有仓库
  • 3种获取OpenStreetMap数据的方法【OSM】
  • 数据处理与统计分析——MySQL与SQL
  • OpenCV之特征点匹配
  • 浅谈开关柜绝缘状态检测与故障诊断
  • Mybatis 动态 SQL
  • Android studio之 build.gradle配置
  • 【ElasticSearch】一键安装IK分词器无需其他操作
  • 在Ubuntu上启动一个简单的用户登录接口服务
  • 【PHP】函数-作用域可变函数匿名函数闭包常用系统函数
  • Python使用pymysql和sqlalchemy访问MySQL的区别
  • ubuntu服务器的mysql,更改root密码,并允许远程连接
  • 微信小程序【构建npm】使用记录
  • mybatis入门的环境搭建及快速完成CRUD(增删改查)
  • 《HeadFirst设计模式(第二版)》第九章代码——组合模式
  • iOS17 widget Content margin
  • 计网第四章(网络层)(一)