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 ...
随机推荐
- QFile 打开文件,不用先判断文件名是否为空,做这多余的工作
void test_file() { QFile file(""); if (!file.open(QIODevice::WriteOnly)){ qDebug()<< ...
- 与某军工背景软件企业分享Azure DevOps Server的经验
DevOps 是英文单词Development和Operations的组合词,是一种用于促进软件开发.运维实施和质量保障部门之间协同工作的过程和方法. 结合软件开发管理规范,应用自动化的构建.测试和发 ...
- switch的对象不能为null
我写的NPE 虽然不多, 但几乎每次系统出问题的时候,看到api返回值是空的,绝大多数是NPE造成的. 这时候会感慨一下谁写的bug,然后去补判空代码. 最近抽风,开始给自己写的代码添加UnitTes ...
- 排障利器之远程调试与监控 --jmx & remote debug
监控和调试功能是应用必备的属性之一,其手段也是多种多样. 一般地,我们可以通过:线上日志, zabbix, grafana, cat 等待系统做一问题留底,有问题及时报警,从而达到监控效果. 而对于应 ...
- C# 处理接口返回的XML格式数据
using System.Xml; //引入命名空间 //模拟接口返回的数据 string str=@"<JZD_Message xmlns:xsd=""http: ...
- Winform中设置ZedGraph鼠标滚轮缩放的灵敏度以及设置滚轮缩放的方式(鼠标焦点为中心还是图形中心点)
场景 Winforn中设置ZedGraph曲线图的属性.坐标轴属性.刻度属性: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/10 ...
- Winform ListBox输出信息并自动滚动至底部
应用场景:ListBox作为软件信息的输出框. //ListBox输出信息 internal void SetListBoxMessage(string str) { if (this.Message ...
- 微信小程序navigator页面跳转失效原因
在编写小程序时遇到一个问题:使用 <navigator url='/pages/lists/index'>...</navigator>进行跳转没有反应.控制台也没有报错,ap ...
- ASP.NET Core系列:读取配置文件
1. 控制台应用 新建一个控制台应用,添加两个Package: Install-Package Microsoft.Extensions.Configuration Install-Package M ...
- HTML input属性详谈
value属性 value属性指定输入字段的初始值: <form> 名字:<br> <input type="text" name="you ...