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 ...
随机推荐
- .Net捕获网站异常信息记录操作日志
第一步:在Global.asax文件下的Application_Error()中写入操作日志 /// <summary> /// 整个网站出现异常信息,都会执行此方法 /// </s ...
- JAVA性能监控与调优参考文档链接
JAVA性能监控与调优参考文档链接 jdk8工具集 https://docs.oracle.com/javase/8/docs/technotes/tools/unix/index.htmlTroub ...
- C# 常用类库(字符串处理,汉字首字母拼音,注入攻击,缓存操作,Cookies操作,AES加密等)
十年河东,十年河西,莫欺少年穷 学无止境,精益求精 记录下字符串类库,方便今后查阅 主要包含了字符串解决,去除HTML,SQL注入攻击检测,IP地址处理,Cookies操作,根据身份证获取性别.姓名. ...
- IOC : Unity 配置和使用
原文出自:IOC : Unity 配置和使用 之前Terry Lee 已经介绍过Unity的简单使用了,不过那篇文章是针对旧版本的,现在的版本1.2版略有不同. 我下载了Unity并做了一个简单的测试 ...
- 「你学习,我买单」i春秋四周年精品课程福利专场
i春秋:中国专业的网络安全在线教育平台,累计用户超过60万. i春秋课程:资深专家团队教研支持,人才培养结合企业需求,针对不同岗位和技术方向的课程总计:600+门,1500+章,5700+节,时长74 ...
- 详解Vue的slot新用法
摘要: 理解Vue插槽. 作者:前端小智 原文:vue 2.6 中 slot 的新用法 Fundebug经授权转载,版权归原作者所有. 为了保证的可读性,本文采用意译而非直译. 最近发布不久的Vue ...
- 白话SCRUM之五:四种会议
在SCRUM方法中定义了4种会议活动: Sprint planning Daily meeting Sprint review Sprint retrospective 除去开发活动外这4种会议构成了 ...
- GCN 简单numpy实现
`#参考:https://blog.csdn.net/weixin_42052081/article/details/89108966 import numpy as np import networ ...
- openstack Train版 “nova-status upgrade check”报错:Forbidden: Forbidden (HTTP 403)
部署openstack train版,在部署完nova项目时,进行检查,执行 nova-status upgrade check 返回报错信息如下: [root@controller ~]# nova ...
- 其他综合-CentOS 7 搭建模板机
CentOS 7 搭建模板机 [基于此文章的环境]点我快速打开文章 1.修改静态地址 ip a|awk -F '[ /]+' '$NF~/eth0/ {print $3}' cat >/etc/ ...