SpringBoot+mybatis+Druid 运行时动态数据源

上传者: wbf810207 | 上传时间: 2022-05-19 21:07:54 | 文件大小: 18KB | 文件类型: ZIP
本demo实现的是在项目运行时,根据参数传递或其他途径获取到数据库连接配置信息,进行动态的连接创建,切换,和销毁

文件下载

资源详情

[{"title":"( 24 个子文件 18KB ) SpringBoot+mybatis+Druid 运行时动态数据源","children":[{"title":"dds","children":[{"title":"src","children":[{"title":"main","children":[{"title":"resources","children":[{"title":"dao","children":[{"title":"mapper","children":[{"title":"TestMapper.xml <span style='color:#111;'> 428B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"application.yml <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"demo","children":[{"title":"dds","children":[{"title":"pojo","children":[{"title":"DataSourceModel.java <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false}],"spread":true},{"title":"dao","children":[{"title":"TestMapper.java <span style='color:#111;'> 286B </span>","children":null,"spread":false},{"title":"mybatis-config.xml <span style='color:#111;'> 622B </span>","children":null,"spread":false}],"spread":true},{"title":"aspect","children":[{"title":"DataSourceAspect.java <span style='color:#111;'> 2.87KB </span>","children":null,"spread":false}],"spread":true},{"title":"controller","children":[{"title":"TestController.java <span style='color:#111;'> 1.27KB </span>","children":null,"spread":false}],"spread":true},{"title":"utils","children":[{"title":"DruidUtil.java <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"SpringUtil.java <span style='color:#111;'> 1.14KB </span>","children":null,"spread":false}],"spread":true},{"title":"service","children":[{"title":"part","children":[{"title":"impl","children":[{"title":"TestServiceImpl.java <span style='color:#111;'> 596B </span>","children":null,"spread":false}],"spread":false},{"title":"TestService.java <span style='color:#111;'> 261B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"common","children":[{"title":"DynamicDataSourceHandler.java <span style='color:#111;'> 1008B </span>","children":null,"spread":false},{"title":"DynamicDataSourceConfig.java <span style='color:#111;'> 2.45KB </span>","children":null,"spread":false}],"spread":true},{"title":"DataSourceCache.java <span style='color:#111;'> 678B </span>","children":null,"spread":false},{"title":"annotation","children":[{"title":"DataSourceEx.java <span style='color:#111;'> 187B </span>","children":null,"spread":false}],"spread":false},{"title":"MainApp.java <span style='color:#111;'> 304B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"test","children":[{"title":"java","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 3.73KB </span>","children":null,"spread":false},{"title":".idea","children":[{"title":".gitignore <span style='color:#111;'> 50B </span>","children":null,"spread":false},{"title":"misc.xml <span style='color:#111;'> 541B </span>","children":null,"spread":false},{"title":"encodings.xml <span style='color:#111;'> 191B </span>","children":null,"spread":false},{"title":"workspace.xml <span style='color:#111;'> 3.14KB </span>","children":null,"spread":false},{"title":"runConfigurations.xml <span style='color:#111;'> 346B </span>","children":null,"spread":false},{"title":"compiler.xml <span style='color:#111;'> 703B </span>","children":null,"spread":false},{"title":"jarRepositories.xml <span style='color:#111;'> 876B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

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