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. 【Beta】Scrum meeting 7

    目录 写在前面 进度情况 任务进度表 Beta-1阶段燃尽图 遇到的困难 照片 commit截图记录 后端代码仓库 技术博客 写在前面 例会时间:5.11 22:30-22:50 例会地点:微信群语音 ...

  2. Salt States概览

    作者言 我也只是SaltStack的初学者,如果文中有错误的地方,请不吝赐教. 在学习的过程,我也做了不少实验,犯了不少错,积累了一些经验,对SaltStack的运行也有一定了解,如果有什么问题,或是 ...

  3. tinylib

    tinylib.h /* -------------------------------------------------------------------------------- oooo ` ...

  4. Unity2D音游案例-节奏大师教程+源码+素材

    Unity2D音游案例-节奏大师(Unity2017.2 ,基于Koreographer),本案例涉及到一些音乐音频音波的一点点内容. 首先,我们会把音游的核心功能实现,之后几个重要内容会出给思路并带 ...

  5. jsch配置sftp服务器ssh免密登录

    前期对接了一个通过ssh免密登录的需求,是基于原先密码登录sftp服务器的代码上进行改造,实际上代码改动量非常少,趁此机会对自己整理的资料做一下总结. 1. 什么是SFTP SFTP是一个安全文件传送 ...

  6. Thinkphp5 实现动态模板主题多个模板切换

    在项目开发过程中会遇到一个网站有不同风格,本文详细介绍Thinkphp5 实现模板主题多个模板切换 一.在Config中配置view_path模板路径代码如下 1 2 3 4 5 6 7 8 9 10 ...

  7. redis报错OOM command not allowed when used memory > 'maxmemory'

    登录到redis上查询 ./redis-cli -h IP -p port -a passwd redis>info memory 查询,内存已耗尽 查询配置文件,发现之前配置最大内存的策略设置 ...

  8. Python Linux系统管理与自动化运维

    Python Linux系统管理与自动化运维 前言 第1章Python语言与Linux系统管理1 1.1Python语言有多流行1 1.2Python语言为什么流行3 1.3Python语言有什么缺点 ...

  9. 微信小程序框架 同时兼容QQ小程序

    最近一直在开发微信小程序,经过几个版本的迭代开发,代码终于能够达到框架级别,动态配置.除了界面有些寒酸以外,功能上还是挺完备的. 主要有以下特点 1.整个程序所需url地址均在api.js中定义,环境 ...

  10. Embarcadero Delphi 7 Lite 7.0.4.453 中文版

    https://www.7down.com/soft/116014.html 软件介绍 Embarcadero Delphi 7精简版 是Windows平台下著名的快速应用程序开发工具(Rapid A ...