springboot2.0整合redis报错
2019独角兽企业重金招聘Python工程师标准>>>
Field factory in com.xdd.xdd_commons.config.RedisTemplateConfig required a bean of type 'org.springframework.data.redis.connection.jedis.JedisConnectionFactory' that could not be found 是由于 2.0和1.5x版本的差别问题导致 按照之前的版本配置出错 找不到jedisConnectionFactory
<!-- Spring Boot Redis依赖 --><!-- 注意:1.5版本的依赖和2.0的依赖不一样,注意看哦 1.5我记得名字里面应该没有“data”, 2.0必须是“spring-boot-starter-data-redis” 这个才行--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-redis</artifactId><!-- 1.5的版本默认采用的连接池技术是jedis 2.0以上版本默认连接池是lettuce, 在这里采用jedis,所以需要排除lettuce的jar --><exclusions><exclusion><groupId>redis.clients</groupId><artifactId>jedis</artifactId></exclusion><exclusion><groupId>io.lettuce</groupId><artifactId>lettuce-core</artifactId></exclusion></exclusions></dependency> <!-- 添加jedis客户端 --><dependency><groupId>redis.clients</groupId><artifactId>jedis</artifactId></dependency><!--spring2.0集成redis所需common-pool2--><!-- 必须加上,jedis依赖此 --><!-- spring boot 2.0 的操作手册有标注 大家可以去看看 地址是:https://docs.spring.io/spring-boot/docs/2.0.3.RELEASE/reference/htmlsingle/--><dependency><groupId>org.apache.commons</groupId><artifactId>commons-pool2</artifactId><version>2.5.0</version></dependency><!-- 将作为Redis对象序列化器 --><dependency><groupId>com.alibaba</groupId><artifactId>fastjson</artifactId><version>1.2.54</version></dependency>
原文引用地址: https://blog.csdn.net/weixin_39723544/article/details/80743074 感谢:瘦子没有夏天
转载于:https://my.oschina.net/u/3022975/blog/3001984
springboot2.0整合redis报错相关推荐
- SpringBoot 整合Redis报错:NoClassDefFoundError: redis/clients/util/SafeEncoder
QUESTION:SpringBoot 整合Redis报错:NoClassDefFoundError: redis/clients/util/SafeEncoder? ANSWER: 这种情况是版本不 ...
- SpringBoot2.0 整合 Redis集群 ,实现消息队列场景
本文源码 GitHub地址:知了一笑 https://github.com/cicadasmile/middle-ware-parent 一.Redis集群简介 1.RedisCluster概念 Re ...
- SpringBoot2.0整合Redis实战
SpringBoot2.x整合Redis实战 1.分布式缓存Redis介绍 简介:讲解为什么要用缓存和介绍什么是Redis,新手练习工具 1.redis官网 https://redis.io/down ...
- springboot整合redis报错org.springframework.beans.factory.UnsatisfiedDependencyException
我的问题出在Cache的实现类中getId()没设置返回值. Error starting ApplicationContext. To display the conditions report r ...
- SpringBoot2.0整合SpringCache和Redis(lettuce)攻略
Redis Redis 是一个高性能的key-value数据库,广泛应用于互联网业务的缓存,如token池,商品缓存等等热点数据的缓存. linux原版官方地址 http://redis.io win ...
- 解决Redis报错:MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist
解决Redis报错:MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on ...
- Spring整合Redis时报错:java.util.NoSuchElementException: Unable to validate object
我在Spring整合Redis时报错,我是犯了一个很低级的错误! 我设置了Redis的访问密码,在Spring的配置文件却没有配置密码这一项,配置上密码后,终于不报错了!
- SpringBoot2.x整合Redis实战 4节课
1.分布式缓存Redis介绍 简介:讲解为什么要用缓存和介绍什么是Redis,新手练习工具 1.redis官网 https://redis.io/download 2.新 ...
- SpringBoot2.x整合redis实战讲解
SpringBoot2.x整合redis实战讲解 简介:使用springboot-starter整合reids实战 1.官网:https://docs.spring.io/spring-boot/do ...
最新文章
- 2021年春季学期-信号与系统-第三次作业参考答案-第八道题
- 皮一皮:21世纪了还有这样的事情?
- Day01 你如何保持健康
- 爱立信总裁表示欧洲网络始终趋于落后,网站推广之下5G发展需加快步伐
- winform 中 给DataGridView的表头添加CheckBox
- Mysql常用分组聚合函数(统计行的数量、最大值、最小值、平均值、求和)
- linux下拨号时间,linux下拨号上网
- HackPorts – Mac OS X 渗透测试框架与工具
- Qt 窗口嵌入桌面 窗口 放在桌面
- Tomcat9下载以及安装
- 微软亚洲研究院20年20人
- 网易有道笔试题(2014届,2013.10北邮站)
- MySQL学习1 基础入门
- 计算机资源管理器出问题怎么办,电脑资源管理器运行异常导致任务栏出现问题...
- P3435 [POI2006]OKR-Periods of Words [Kmp, next数组]
- C:/Inetpub/AdminsScripts的常用语法
- 论文阅读:RepPoints: Point Set Representation for Object Detection
- ArcGIS Engine 通过线构造面
- 3G上网:按时长计费是运营商的“最佳选择”
- avplayer视频重复循环播放,视频重播