问题:

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的更多相关文章

  1. 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. ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 【解决方案】 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userHandler': Injection of resource dependencies failed;

    一个错误会浪费好多青春绳命 鉴于此,为了不让大家也走弯路,分享解决方案. [错误代码提示] StandardWrapper.Throwableorg.springframework.beans.fac ...

  6. 开发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 ...

  7. 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' ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. [LOJ 2133][UOJ 131][BZOJ 4199][NOI 2015]品酒大会

    [LOJ 2133][UOJ 131][BZOJ 4199][NOI 2015]品酒大会 题意 给定一个长度为 \(n\) 的字符串 \(s\), 对于所有 \(r\in[1,n]\) 求出 \(s\ ...

  2. Flutter基础系列之混合开发(二)

    1.混合开发的场景 1.1作为独立页面加入 这是以页面级作为独立的模块加入,而不是页面的某个元素. 原生页面可以打开Flutter页面 Flutter页面可以打开原生页面 1.2作为页面的一部分嵌入 ...

  3. sed命令常用用法

    1.字符串替换 sed -i "s/xxx/yyy/g" /home/test.log // 将home目录下的test.txt文件中的所有xxx字符串替换成yyy字符串 sed ...

  4. Leetcode练习题Remove Element

    Leetcode练习题Remove Element Question: Given an array nums and a value val, remove all instances of tha ...

  5. List集合分组实现教程

    封装一个方法,用一个Map来实现,这里是根据bean类的seq字段进行拆分的,分成好几个list private LinkedHashMap<String,List<HandleInfo& ...

  6. select下拉框option的样式修改

    select原样式: 进行样式修改后的样式: 附上修改代码: //select外面必须包裹一个div,用来覆盖select原有的样式<div class="option"&g ...

  7. gperf heap profiler

    前言 gperf tools有很多功能,其中有一个heap profiler,可按函数级别定位分配内存的累积量 原理 gperf tools需要替换libc的malloc库,替换为tcmalloc:t ...

  8. restful api的10个最佳实践

    Web API在过去的几年里非常盛行,因为它有着语法简单.规范化和轻量级的优点,因为得到广泛的推崇,很多过往的技术手段都慢慢转换为使用Web API来开发.而Web API通常使用的设计方式是REST ...

  9. SpringBoot多数据源动态切换数据源

    1.配置多数据源 spring: datasource: master: password: erp_test@abc url: jdbc:mysql://127.0.0.1:3306/M201911 ...

  10. 记录自己运行eShopOnContainers过程中遇到的坑

    由于各种各样的问题,依照官方文档运行eShopOnContainers项目遇到了好多莫名其妙的错误. 好在最后都解决了,在此记录,以防自己以后再遇到,也为遇到同样问题的同学提供参考. 参考的官方文档 ...