spring boot + mybatis(通用mapper) druid多数据源切换配置

上传者: 33475202 | 上传时间: 2019-12-21 20:41:47 | 文件大小: 63KB | 文件类型: zip
1.配置数据源,2.动态数据源切换,3.注册动态数据源,4.动态数据源注解切点,5.通过切点切换数据源,6.在service层通过注解切换不同数据源,7.启动项目

文件下载

资源详情

[{"title":"( 56 个子文件 63KB ) spring boot + mybatis(通用mapper) druid多数据源切换配置","children":[{"title":"demo-boot-multdata","children":[{"title":".project <span style='color:#111;'> 1.55KB </span>","children":null,"spread":false},{"title":".apt_generated","children":null,"spread":false},{"title":"src","children":[{"title":"sql","children":[{"title":"auth.sql <span style='color:#111;'> 3.69KB </span>","children":null,"spread":false},{"title":"auth1.sql <span style='color:#111;'> 4.92KB </span>","children":null,"spread":false}],"spread":true},{"title":"test","children":[{"title":"resources","children":null,"spread":false},{"title":"java","children":null,"spread":false}],"spread":true},{"title":"main","children":[{"title":"webapp","children":null,"spread":false},{"title":"resources","children":[{"title":"generatorConfig.xml <span style='color:#111;'> 1.57KB </span>","children":null,"spread":false},{"title":"application.properties <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false},{"title":"mapper","children":[{"title":"AuthUserMapper.xml <span style='color:#111;'> 974B </span>","children":null,"spread":false}],"spread":true},{"title":"logback.xml <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"xe","children":[{"title":"demo","children":[{"title":"common","children":[{"title":"pojo","children":[{"title":"PageAjax.java <span style='color:#111;'> 9.50KB </span>","children":null,"spread":false},{"title":"AjaxResult.java <span style='color:#111;'> 1.27KB </span>","children":null,"spread":false}],"spread":false},{"title":"utils","children":[{"title":"AppUtil.java <span style='color:#111;'> 5.84KB </span>","children":null,"spread":false}],"spread":false},{"title":"dao","children":[{"title":"MyMapper.java <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false}],"spread":false},{"title":"ds","children":[{"title":"DynamicDataSource.java <span style='color:#111;'> 749B </span>","children":null,"spread":false},{"title":"TargetDataSource.java <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"DynamicDataSourceAspect.java <span style='color:#111;'> 983B </span>","children":null,"spread":false},{"title":"DynamicDataSourceRegister.java <span style='color:#111;'> 4.32KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"service","children":[{"title":"UserService.java <span style='color:#111;'> 1.83KB </span>","children":null,"spread":false},{"title":"AbstratService.java <span style='color:#111;'> 2.53KB </span>","children":null,"spread":false}],"spread":false},{"title":"model","children":[{"title":"AuthUser.java <span style='color:#111;'> 3.27KB </span>","children":null,"spread":false}],"spread":false},{"title":"controller","children":[{"title":"UserController.java <span style='color:#111;'> 1.44KB </span>","children":null,"spread":false}],"spread":false},{"title":"mapper","children":[{"title":"AuthUserMapper.java <span style='color:#111;'> 173B </span>","children":null,"spread":false}],"spread":false},{"title":"Application.java <span style='color:#111;'> 1.16KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"target","children":[{"title":"m2e-jee","children":[{"title":"web-resources","children":[{"title":"META-INF","children":[{"title":"MANIFEST.MF <span style='color:#111;'> 364B </span>","children":null,"spread":false},{"title":"maven","children":[{"title":"com.xe.demo","children":[{"title":"demo-boot-multdata","children":[{"title":"pom.properties <span style='color:#111;'> 248B </span>","children":null,"spread":false},{"title":"pom.xml <span style='color:#111;'> 4.55KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"classes","children":[{"title":"generatorConfig.xml <span style='color:#111;'> 1.57KB </span>","children":null,"spread":false},{"title":"application.properties <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false},{"title":"mapper","children":[{"title":"AuthUserMapper.xml <span style='color:#111;'> 974B </span>","children":null,"spread":false}],"spread":true},{"title":"com","children":[{"title":"xe","children":[{"title":"demo","children":[{"title":"common","children":[{"title":"pojo","children":[{"title":"PageAjax.class <span style='color:#111;'> 8.37KB </span>","children":null,"spread":false},{"title":"AjaxResult.class <span style='color:#111;'> 2.10KB </span>","children":null,"spread":false}],"spread":false},{"title":"utils","children":[{"title":"AppUtil.class <span style='color:#111;'> 6.81KB </span>","children":null,"spread":false}],"spread":false},{"title":"dao","children":[{"title":"MyMapper.class <span style='color:#111;'> 347B </span>","children":null,"spread":false}],"spread":false},{"title":"ds","children":[{"title":"TargetDataSource.class <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"DynamicDataSource.class <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false},{"title":"DynamicDataSourceRegister.class <span style='color:#111;'> 6.07KB </span>","children":null,"spread":false},{"title":"DynamicDataSourceAspect.class <span style='color:#111;'> 1.20KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"service","children":[{"title":"UserService.class <span style='color:#111;'> 3.09KB </span>","children":null,"spread":false},{"title":"AbstratService.class <span style='color:#111;'> 4.31KB </span>","children":null,"spread":false}],"spread":false},{"title":"model","children":[{"title":"AuthUser.class <span style='color:#111;'> 2.37KB </span>","children":null,"spread":false}],"spread":false},{"title":"controller","children":[{"title":"UserController.class <span style='color:#111;'> 2.04KB </span>","children":null,"spread":false}],"spread":false},{"title":"mapper","children":[{"title":"AuthUserMapper.class <span style='color:#111;'> 271B </span>","children":null,"spread":false}],"spread":false},{"title":"Application.class <span style='color:#111;'> 1.63KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"logback.xml <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false}],"spread":true},{"title":"test-classes","children":null,"spread":false}],"spread":true},{"title":".factorypath <span style='color:#111;'> 9.67KB </span>","children":null,"spread":false},{"title":".settings","children":[{"title":"org.eclipse.wst.jsdt.ui.superType.container <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.project.facet.core.xml <span style='color:#111;'> 344B </span>","children":null,"spread":false},{"title":"org.eclipse.m2e.core.prefs <span style='color:#111;'> 90B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 488B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.validation.prefs <span style='color:#111;'> 50B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.jsdt.ui.superType.name <span style='color:#111;'> 6B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.apt.core.prefs <span style='color:#111;'> 68B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.project.facet.core.prefs.xml <span style='color:#111;'> 161B </span>","children":null,"spread":false},{"title":"org.eclipse.core.resources.prefs <span style='color:#111;'> 250B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.component <span style='color:#111;'> 766B </span>","children":null,"spread":false},{"title":".jsdtscope <span style='color:#111;'> 572B </span>","children":null,"spread":false}],"spread":false},{"title":"pom.xml <span style='color:#111;'> 4.55KB </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 1.63KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • lht900513 :
    还可以,有一定的参考意义,3q
    2021-05-13

免责申明

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