Cannot resolve reference to bean 'mongoTemplate' while setting bean property 'mongoOperations'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with na
问题:
Springboot 启动时出错,报没法创建bean的错误,看到nested最后是关于mongoTemplate的错误。
过程:
看网上大多说的是修改mongoTemplate的配置,但是springBoot自动注入我都没有配置,还有的说是注解没有写比如@service @autowired等,检查了一下都对啊。
解决方法
我之前运行的时候都挺好的啊,找了半天,才发现之前更新了一下 spring-data-mongodb依赖 从2.1.6到2.2.0 ,应该是兼容的问题,回退到2.1.6就好了。
Cannot resolve reference to bean 'mongoTemplate' while setting bean property 'mongoOperations'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with na的更多相关文章
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [spring/applicationContext-service.xml]: Cannot resolve refer
<!-- aop --> <aop:config> <aop:pointcut expression="execution(* com.zsn.Service. ...
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'
七月 05, 2018 10:26:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin警告: [SetPropertiesRul ...
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'catchFromPBomService': Cannot create inner bean '(inner bean)#302efb82' of type [com.thinkgem.jeesite.modules.fd
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'catchFromPBo ...
- Dubbo管理平台搭建(duboo-admin-2.5.4)遇到的问题:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uriBrokerService': Cannot create inner bean '(inner bean)' of type
1.将dubbo的war包方式tomcat的webapps文件夹下,启动tomcat报错 错误信息如下: ERROR context.ContextLoader - Context initializ ...
- 【解决方案】 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userHandler': Injection of resource dependencies failed;
一个错误会浪费好多青春绳命 鉴于此,为了不让大家也走弯路,分享解决方案. [错误代码提示] StandardWrapper.Throwableorg.springframework.beans.fac ...
- 开发Spring过程中几个常见异常(二):Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'a' define
本异常是小编在运行自己另外一篇博文中的例子时遇到的.(附博文:http://www.cnblogs.com/dudududu/p/8482487.html) 完整异常信息: 警告: Exception ...
- aused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method fai
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'roleDaoImpl' ...
- Spring AOP 报错org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'XXXXXX' defined in class path resource..........
完整报错如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'befo ...
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cardSalDao' defined in file [E:\GItUp\pointerCard+redis\target\gameCard-1.0-SNAPSHOT\WEB-INF\classes\cn\jbit\dao
错误信息: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cardSa ...
随机推荐
- 彻底解决Intellij IDEA中文乱码问题
关于JAVA IDE开发工具,Eclipse系列和Intelli IDEA是大部分公司的主要选择,从开发者的选择角度,Intellij IDEA似乎比Eclipse系列更受欢迎一些.当我们使用Inte ...
- Mac流程图的软件
里面有破解机器,按照步骤一步步来就可以了 https://www.zhinin.com/omnigraffle_pro-mac.html
- 【shell脚本】定时备份数据库===dbbackup.sh
定时备份数据库是很有必要的 一.脚本内容 [root@localhost dbbackup]# cat dbbackup.sh #!/bin/bash #备份数据库 mysqldump -uroot ...
- nginx 日志配置log_format用法
nginx服务器日志相关指令主要有两条: 1.一条是log_format,用来设置日志格式: 2.另外一条是access_log,用来指定日志文件的存放路径.格式和缓存大小,可以参加ngx_http_ ...
- C# CSV Generic T
This artice will write the main step to export generic data via csv with complete code and step by s ...
- Linux目录和文件——管理目录和文件的命令
Linux目录和文件——管理目录和文件的命令 摘要:本文主要学习了Linux系统中关于目录和文件的操作. cd命令 cd命令用来切换工作目录,是Change Directory的缩写. 基本语法 cd ...
- Java生鲜电商平台-商品价格的设计与架构
Java生鲜电商平台-商品价格的设计与架构 说明:Java开源生鲜电商平台-商品价格的设计与架构,主要是对商品的价格进行研究与系统架构. 一.常见的电商价格 市场价(List Price):这个价格仅 ...
- Map-HashMap-遍历
第一种遍历方法 : 先获取Map中的所有key值,然后根据key,依次从Map中去数据 (针对只取 Key 或者 Value 的情况) Map<String, String> hashMa ...
- SQLi-LABS Page-2 (Adv Injections) Less23-Less26
Less-23 GET - Error based - strip comments http://10.10.202.112/sqli/Less-23?id=1' Warning: mysql_fe ...
- python3匿名函数
当我们在传入函数时,有些时候,不需要显式地定义函数,直接传入匿名函数更方便. 在Python中,对匿名函数提供了有限支持.还是以map()函数为例,计算f(x)=x2时,除了定义一个f(x)的函数外, ...