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.
通过上面的Description信息可以看出来,报错在UserServiceImpl 中,具体UserServiceImpl 代码如下图所示:
解决方案:
将 RedisTemplate<String, List> redisTemplate
的注解 @Autowired
更换为 @Resource
再次运行,问题搞定。
你可能感兴趣的文章:
- Difference in @Resource and @Autowired
- Spring 注释 @Autowired 和@Resource 的区别
- @Resource与@Autowired用法区别
- 简析@Resource 和 @Autowired的区别
Field redisTemplate in xxxxxx required a bean of type 'org.springframework.data.redis.core.RedisTemplate' that could not be found.的更多相关文章
- Parameter 0 of method redisTemplate in org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration required a bean of type 'org.springframework.data.redis.connection.RedisConnectionFactor
Error starting ApplicationContext. To display the conditions report re-run your application with 'de ...
- SpringBoot- springboot集成Redis出现报错:No qualifying bean of type 'org.springframework.data.redis.connection.RedisConnectionFactory'
Springboot将accessToke写入Redisk 缓存,springboot集成Redis出现报错 No qualifying bean of type 'org.springframewo ...
- Consider defining a bean of type 'org.springframework.data.redis.connection.RedisConnectionFactory' in your configuration
Description: Parameter 0 of method redisTemplate in com.liaojie.cloud.auth.server.config.redis.Redis ...
- Spring源码追踪1——doGetBean(为什么org.springframework.data.redis.core.RedisTemplate的实例可以注入为ListOperations)
类org.springframework.beans.factory.support.AbstractBeanFactory方法T doGetBean(final String name, final ...
- 运行springboot项目报错:Field userMapper in XX required a bean of type 'xx' that could not be found.
运行springboot项目报错: *************************** APPLICATION FAILED TO START ************************** ...
- gateway启动报错:org.springframework.cloud.gateway.config.GatewayAutoConfiguration required a bean of type 'org.springframework.http.codec.ServerCodecConfigurer' that could not be found
将pom.xml中关于spring-boot-start-web模块的jar依赖去掉. 错误分析: 根据上面描述(Description)中信息了解到GatewayAutoConfiguration这 ...
- 解决:No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] found for dependency
错误: Description: Field jdbcTemplate in com.gwd.dao.impl.IUserDaoImpl required a bean of type 'org.sp ...
- Spring Cloud ZooKeeper集成Feign的坑1,错误:Consider defining a bean of type 'org.springframework.web.client.RestTemplate' in your configuration.
错误如下: ERROR 31473 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** A ...
- Consider defining a bean of type 'org.springframework.web.client.RestTemplate' in your configuration
https://www.cnblogs.com/EasonJim/p/7546136.html 错误如下: ERROR 31473 --- [ main] o.s.b.d.LoggingFailure ...
随机推荐
- css sprite responsive实现探究
在做web app前端设计时,为了减少http的请求,提高系统响应时间,有一个非常常见的优化措施是:将所有用到的静态的图片通过合并形成一个sprite.png,并且配合background-posit ...
- vue学习指南:第九篇(详细) - Vue的 Slot-插槽
Slot v-slot 插槽元素 浏览器在解析时候首先把它当作标签来解析,只有遇到不认识的就不管了,直接跳过,当你发现是组件,在以组件形式解析. 使用插槽的好处? 比如一个网站 分布顶部都是一样的, ...
- [b0016] python 归纳 (二)_静态方法和类方法
# -*- coding: UTF-8 -*- """ 测试 类的静态方法,类方法 @staticmethod @classmethod 总结: 1. self 指向类对 ...
- [linux]在使用rsync时需要注意的小细节
很简单:前一个目录末尾是目录的话,最后是否带/是有区别的. 具体看测试: # usr @ the-pc in ~/cptest02 [2:28:02] $ ll 总用量 0 # usr @ the-p ...
- JMETER 审批任务实战
业务场景 我们需要对流程任务进行审批,这个和流程发起是不一样的,因为在流程发起时,只需要用户登录后,指定固定的流程方案和数据就可以发起流程了. 流程任务是需要获取任务ID再做任务审批的. 实现思路 1 ...
- CentOS 7上安装Docker
目录 安装步骤 1.查看Docker的版本 2.安装 Docker 3.启动Docker 4.设置为开启启动 5.查看Docker安装信息 6.使用Docker 中国加速器 安装步骤 安装操作系统 ...
- <人人都懂设计模式>-单例模式
这个模式,我还是了解的. 书上用了三种不同的方法. class Singleton1: # 单例实现方式1 __instance = None __is_first_init = False def ...
- 跳表和ConcurrentSkipListMap解析
二分查找和AVL树查找 二分查找要求元素可以随机访问,所以决定了需要把元素存储在连续内存.这样查找确实很快,但是插入和删除元素的时候,为了保证元素的有序性,就需要大量的移动元素了. 如果需要的是一个能 ...
- selenium 2定位方式实例
#########百度输入框的定位方式########## #通过id方式定位 browser.find_element_by_id("kw").send_keys("s ...
- VIJOS-P1421 更换轮胎
JDOJ 1506: VIJOS-P1421 更换轮胎 https://neooj.com/oldoj/problem.php?id=1506 Description 经过数周的期待,比赛终于正式开始 ...