Parameter 0 of method orderSqlSessionFactory in com.config.MultipleDBConfig required a single bean, but 2 were found:
- orderDataSource: defined by method 'orderDataSource' in class path resource [com/config/MultipleDBConfig.class]
- crmDataSource: defined by method 'crmDataSource' in class path resource [com/config/MultipleDBConfig.class] Action: Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed

坑:以上方式链接多数据源时,

在springboot1.x时  datasource上要在一个写数据源上标记@Primary为主数据源

而在springboot2.X时则不需要

Parameter 0 of method sqlSessionTemplate in org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration required a single bean, but 2 were found:的更多相关文章

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

  2. spring boot:使用分布式事务seata(druid 1.1.23 / seata 1.3.0 / mybatis / spring boot 2.3.2)

    一,什么是seata? Seata:Simpe Extensible Autonomous Transcaction Architecture, 是阿里中间件开源的分布式事务解决方案. 前身是阿里的F ...

  3. spring boot:配置shardingsphere(sharding jdbc)使用druid数据源(druid 1.1.23 / sharding-jdbc 4.1.1 / mybatis / spring boot 2.3.3)

    一,为什么要使用druid数据源? 1,druid的优点 Druid是阿里巴巴开发的号称为监控而生的数据库连接池 它的优点包括: 可以监控数据库访问性能 SQL执行日志 SQL防火墙 但spring ...

  4. mybatis+spring boot, mapper 提示Could not autowire. No beans of … type found

    工具及背景: IntelliJ IDEA 2016.1.3 Ultimate.spring boot, maven项目,利用mybatis 注解的方式查询mysql. 业务逻辑关系:controlle ...

  5. spring boot: filter/interceptor/aop在获取request/method参数上的区别(spring boot 2.3.1)

    一,filter/interceptor/aop在获取参数上有什么区别? 1,filter可以修改HttpServletRequest的参数(doFilter方法的功能), interceptor/a ...

  6. 0. 资料官网【从零开始学Spring Boot】

    [视频&交流平台] àSpringBoot视频 http://study.163.com/course/introduction.htm?courseId=1004329008&utm ...

  7. mybatis spring boot深入

    [size=large]头一篇博文说了整合了spring boot和mybatis大家都可以对后台数据进行操作但是如何才能进行高效的操作数据库节省代码,下面来一起谈论哈mybatis的通用mapper ...

  8. mybatis+spring boot+vue

    参考https://www.cnblogs.com/wlovet/p/8317282.html

  9. spring boot整合mybatis+mybatis-plus

    Spring boot对于我来说是一个刚接触的新东西,学习过程中,发现这东西还是很容易上手的,Spring boot没配置时会默认使用Spring data jpa,这东西可以说一个极简洁的工具,可是 ...

随机推荐

  1. mysql5.7密码过期ERROR 1862 (HY000): Your password has expired. To log in you must change

    环境: ubuntu14.04  mysql5.7 一.mysql5.7 密码过期问题 报错: ERROR 1862 (HY000): Your password has expired. To lo ...

  2. 经典算法(一) top k

    问题:1亿数据中,找出最大的k个数,要求使用内存不超过1m (延伸问题:1亿数据中,找出重复出现次数最多的k个,要求使用内存不超过1m 等) 分析: 1亿数字(int)占内存:100000000 * ...

  3. SAS 获取系统选项设置的过程步 PROC OPTIONS OPTION=()

    PROC OPTIONS OPTION=(VALIDVARNAME LS);RUN;

  4. Css3 文字渐变整理(一)

    一.文本颜色渐变 <gradient> :可以应用在所有接受图像的属性上,允许使用简单的语法实现颜色渐变,以便UA在渲染页面自动生成图像. 语法:<gradient> = li ...

  5. SpringCloud之application.properties和bootstrap.properties区别

    Spring是有上下文一说的,也叫Application Context,Application Context又是有父子关系的,所以必须要理解ApplicationContext是什么.Spring ...

  6. [linux]查看进程占用内存

    1.top -p 进程ID PID:进程的ID USER:进程所有者 PR:进程的优先级别,越小越优先被执行 NInice:值 VIRT:进程占用的虚拟内存 RES:进程占用的物理内存 SHR:进程使 ...

  7. KMS服务器激活

    https://blog.csdn.net/weixin_42588262/article/details/81120403 http://kms.cangshui.net/ https://kms. ...

  8. (转nginx不浏览直接下载文件的解决方法

    原文:https://www.zhan200.com/xwt/39.html 如果nginx配置不对,就会造成部分文件,在浏览器中不是直接预览,而是进行了下载.修改的方法是修改配置文件.具体解决方法如 ...

  9. log-structured-merge-trees

    https://juejin.im/post/5bbbf7615188255c59672125 https://www.cnblogs.com/siegfang/archive/2013/01/12/ ...

  10. sublime的注册方法 非常好用

    摘自:https://blog.csdn.net/weixin_42444922/article/details/81006107 转载 阿东的天空之城 发布于2018-07-11 20:03:43 ...