springboot mybatis 集成多数据源 两种实现方式

上传者: maoyeqiu | 上传时间: 2021-09-04 10:06:38 | 文件大小: 35KB | 文件类型: RAR
springboot mybatis 集成多数据源 两种实现方式,一种静态添加,一种动态添加,后者能够支持很好的拓展。使用注解的方式实现,项目打包了一个module

文件下载

资源详情

[{"title":"( 51 个子文件 35KB ) springboot mybatis 集成多数据源 两种实现方式","children":[{"title":"readwrite","children":[{"title":"src","children":[{"title":"test","children":[{"title":"java","children":[{"title":"com","children":[{"title":"hui","children":[{"title":"ReadwriteApplicationTests.java <span style='color:#111;'> 327B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"main","children":[{"title":"resources","children":[{"title":"application.properties <span style='color:#111;'> 1.29KB </span>","children":null,"spread":false},{"title":"mapper","children":[{"title":"master1","children":[{"title":"usermapper.xml <span style='color:#111;'> 768B </span>","children":null,"spread":false}],"spread":true},{"title":"master2","children":[{"title":"countmapper.xml <span style='color:#111;'> 755B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"hui","children":[{"title":"readwrite","children":[{"title":"conf","children":[{"title":"Master2DataSourceConfig.java <span style='color:#111;'> 2.61KB </span>","children":null,"spread":false},{"title":"Master1DataSourceConfig.java <span style='color:#111;'> 2.59KB </span>","children":null,"spread":false}],"spread":true},{"title":"service","children":[{"title":"CountService.java <span style='color:#111;'> 657B </span>","children":null,"spread":false},{"title":"UserService.java <span style='color:#111;'> 645B </span>","children":null,"spread":false}],"spread":true},{"title":"controller","children":[{"title":"CountController.java <span style='color:#111;'> 1016B </span>","children":null,"spread":false},{"title":"UserController.java <span style='color:#111;'> 1.06KB </span>","children":null,"spread":false}],"spread":true},{"title":"mapper","children":[{"title":"master1","children":[{"title":"UserMapper.java <span style='color:#111;'> 379B </span>","children":null,"spread":false}],"spread":true},{"title":"master2","children":[{"title":"CountMapper.java <span style='color:#111;'> 348B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"multidata","children":[{"title":"DataSourceAop.java <span style='color:#111;'> 993B </span>","children":null,"spread":false},{"title":"DataBaseConfiguration.java <span style='color:#111;'> 1.78KB </span>","children":null,"spread":false},{"title":"DataSourceType.java <span style='color:#111;'> 646B </span>","children":null,"spread":false},{"title":"DataSourceTransactionManager.java <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"DataSourceContextHolder.java <span style='color:#111;'> 682B </span>","children":null,"spread":false},{"title":"TxxsbatisConfiguration.java <span style='color:#111;'> 3.13KB </span>","children":null,"spread":false},{"title":"TxxsAbstractRoutingDataSource.java <span style='color:#111;'> 976B </span>","children":null,"spread":false}],"spread":true},{"title":"po","children":[{"title":"Count.java <span style='color:#111;'> 797B </span>","children":null,"spread":false},{"title":"User.java <span style='color:#111;'> 848B </span>","children":null,"spread":false}],"spread":false},{"title":"respository","children":[{"title":"CountRespository.java <span style='color:#111;'> 731B </span>","children":null,"spread":false},{"title":"UserRespository.java <span style='color:#111;'> 637B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"ReadwriteApplication.java <span style='color:#111;'> 305B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"target","children":[{"title":"generated-test-sources","children":[{"title":"test-annotations","children":null,"spread":false}],"spread":true},{"title":"generated-sources","children":[{"title":"annotations","children":null,"spread":false}],"spread":true},{"title":"classes","children":[{"title":"application.properties <span style='color:#111;'> 1.37KB </span>","children":null,"spread":false},{"title":"mapper","children":[{"title":"master1","children":[{"title":"usermapper.xml <span style='color:#111;'> 768B </span>","children":null,"spread":false}],"spread":true},{"title":"master2","children":[{"title":"countmapper.xml <span style='color:#111;'> 755B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"com","children":[{"title":"hui","children":[{"title":"ReadwriteApplication.class <span style='color:#111;'> 701B </span>","children":null,"spread":false},{"title":"readwrite","children":[{"title":"conf","children":[{"title":"Master2DataSourceConfig.class <span style='color:#111;'> 340B </span>","children":null,"spread":false},{"title":"Master1DataSourceConfig.class <span style='color:#111;'> 340B </span>","children":null,"spread":false}],"spread":true},{"title":"service","children":[{"title":"UserService.class <span style='color:#111;'> 951B </span>","children":null,"spread":false},{"title":"CountService.class <span style='color:#111;'> 960B </span>","children":null,"spread":false}],"spread":true},{"title":"controller","children":[{"title":"UserController.class <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false},{"title":"CountController.class <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false}],"spread":false},{"title":"mapper","children":[{"title":"master1","children":[{"title":"UserMapper.class <span style='color:#111;'> 395B </span>","children":null,"spread":false}],"spread":false},{"title":"master2","children":[{"title":"CountMapper.class <span style='color:#111;'> 400B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"multidata","children":[{"title":"DataSourceAop.class <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false},{"title":"DataSourceContextHolder.class <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false},{"title":"TxxsbatisConfiguration.class <span style='color:#111;'> 3.77KB </span>","children":null,"spread":false},{"title":"DataBaseConfiguration.class <span style='color:#111;'> 2.03KB </span>","children":null,"spread":false},{"title":"DataSourceType.class <span style='color:#111;'> 1.62KB </span>","children":null,"spread":false},{"title":"TxxsAbstractRoutingDataSource.class <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"DataSourceTransactionManager.class <span style='color:#111;'> 1.00KB </span>","children":null,"spread":false}],"spread":false},{"title":"po","children":[{"title":"User.class <span style='color:#111;'> 1.25KB </span>","children":null,"spread":false},{"title":"Count.class <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false}],"spread":false},{"title":"respository","children":[{"title":"UserRespository.class <span style='color:#111;'> 969B </span>","children":null,"spread":false},{"title":"CountRespository.class <span style='color:#111;'> 739B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"test-classes","children":[{"title":"com","children":[{"title":"hui","children":[{"title":"ReadwriteApplicationTests.class <span style='color:#111;'> 619B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"readwrite.iml <span style='color:#111;'> 9.02KB </span>","children":null,"spread":false},{"title":"pom.xml <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 249B </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • benyue200 :
    不错,谢谢分享
    2018-11-08
  • shituc :
    不错,谢谢分享
    2018-08-06
  • weixin_40210707 :
    不错的资源 很有用 实现了自己想要的效果
    2018-07-04
  • yy6060 :
    不错,很好,可用,谢谢!
    2018-06-20
  • fengkuangshixisheng :
    不错,谢谢分享
    2018-06-11

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明