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 with 'debug' enabled.
2019-09-09 14:16:09.385 ERROR 10464 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : ***************************
APPLICATION FAILED TO START
***************************Description:Field redisTemplate in com.jr.service.planokr.utils.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.Disconnected from the target VM, address: '127.0.0.1:51021', transport: 'socket'Process finished with exit code 1
如果你的jar引入,并且版本对的话,
检查你的用法:
@Autowiredprivate RedisTemplate<String, Object> redisTemplate;
改为:
@Autowiredprivate RedisTemplate redisTemplate;
springboot 配置RedisTemplate 报:Field redisTemplate in XXX required a bean of type 'org.springframework相关推荐
- 显示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 ...
- 【踩坑专栏】Field xxFeignClient in xxx required a bean of type ‘xxx.XXFeignClient‘ that could not be found
首先我的feignClient上已标注解@FeignClient,出现这个问题的原因是因为启动类需要注解@EnableFeignClients(basePackages = "xx.xx.x ...
- 解决:Field xxClient in XXX required a bean of type 'XXX' that could not be found
使用@Autowired导入client时报如下错误: 找不到这个client,于是到启动类里观察 @EnableFeignClients("")配置路径,发现果然不对: 修改后问 ...
- 【SpringBooot报错】eld redisTemplate in com.buba.utils.RedisUtils required a bean of type
报错如下: 2022-07-19 14:10:36.111 ERROR 16164 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporte ...
- 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 ...
- 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 ...
- springboot踩坑日记——Field xxx.xxx.xxx required a bean of type 'xxx.xxx.xxx' that could not be found
使用feign时报创建的feign接口找不到 Field xxx.xxx.xxx required a bean of type 'xxx.xxx.xxx' that could not be fou ...
- Field XXXService in com.XXX.controller.XXX required a bean of type ‘com.XXX.mapper.xxx‘that could no
解决办法: Field surveyTypeService in com.XXX.controller.XXX required a bean of type 'com.XXX.mapper.xxx' ...
- 使用Feign服务远程调用项目启动时报错:Field xxx in xxx required a bean of type xxx that could not be found.
报错: *************************** APPLICATION FAILED TO START ***************************Description:F ...
最新文章
- Android_微信_设置
- JQuery中的样式操作
- linux es数据库 head,elasticsearch安装es-sql插件
- 2013款MacBook Air装Windows7单系统
- thinkphp3.2.3版本的数据库增删改查实例
- 高端的面试从来不会在HashMap的红黑树上纠缠太多
- 阿里云服务器ECS选型
- 计划doing.....
- SWAP Detector:GrammaTech 开源 DevOps 应用安全测试工具
- 三元表达式、列表推导式、生成器表达式、递归、匿名函数、内置函数(day4)
- 异常 java.net.SocketTimeoutException: Read timed out
- mysql with roll up_GROUP BY...WITH ROLL UP 分组统计后的再合计
- java遍历文件夹_java中File类应用遍历文件夹下所有文件
- 各类杀软对应的进程名
- SQL Server数据库的创建方法
- 使用torchvision时报错:ModuleNotFoundError: No module named ‘six‘
- Unity基于YooAssets资源管理1
- 《原则》瑞·达利欧 --(五万字手敲笔记)
- JavaScript网页特效-“渔夫打鱼晒网”程序设计
- 重要的人工神经元--感知器和Sigmod神经元