SpringMVC+多数据源Mysql(Mybatis)+多数据源Mongo

上传者: shiyingchun | 上传时间: 2023-03-11 18:13:44 | 文件大小: 23KB | 文件类型: RAR
SpringMVC+Mybatis(多数据源)+Mongo(多数据源),框架适合同时访问多种DB,且支持每种DB配置多个数据源。正如我代码中的demo,配置了两个mysql数据源+2个mongo数据源,可以在service实现中随意访问。除此之外还通过maven profile支持了多环境自动切换配置。欢迎下载,互相学习。

文件下载

资源详情

[{"title":"( 28 个子文件 23KB ) SpringMVC+多数据源Mysql(Mybatis)+多数据源Mongo","children":[{"title":"uranus","children":[{"title":"pom.xml <span style='color:#111;'> 6.68KB </span>","children":null,"spread":false},{"title":"src","children":[{"title":"test","children":[{"title":"resources","children":null,"spread":false},{"title":"java","children":[{"title":"com","children":[{"title":"test","children":[{"title":"BaseTest.java <span style='color:#111;'> 1.68KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"main","children":[{"title":"webapp","children":[{"title":"WEB-INF","children":[{"title":"web.xml <span style='color:#111;'> 1.89KB </span>","children":null,"spread":false},{"title":"view","children":null,"spread":false}],"spread":true},{"title":"index.jsp <span style='color:#111;'> 104B </span>","children":null,"spread":false}],"spread":true},{"title":"resources","children":[{"title":"mybatis-config.xml <span style='color:#111;'> 621B </span>","children":null,"spread":false},{"title":"mongodb-context.xml <span style='color:#111;'> 2.26KB </span>","children":null,"spread":false},{"title":"mongodb.properties <span style='color:#111;'> 973B </span>","children":null,"spread":false},{"title":"mysql.properties <span style='color:#111;'> 462B </span>","children":null,"spread":false},{"title":"spring-mvc.xml <span style='color:#111;'> 2.65KB </span>","children":null,"spread":false},{"title":"log4j.properties <span style='color:#111;'> 941B </span>","children":null,"spread":false},{"title":"com","children":[{"title":"czj","children":[{"title":"bi","children":[{"title":"mapper","children":[{"title":"demo","children":[{"title":"DemoMapper.xml <span style='color:#111;'> 317B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":true},{"title":"env","children":[{"title":"test.config.properties <span style='color:#111;'> 770B </span>","children":null,"spread":false},{"title":"dev.config.properties <span style='color:#111;'> 770B </span>","children":null,"spread":false},{"title":"prod.config.properties <span style='color:#111;'> 770B </span>","children":null,"spread":false}],"spread":false},{"title":"applicationContext.xml <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"mysql-context.xml <span style='color:#111;'> 5.36KB </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"czj","children":[{"title":"bi","children":[{"title":"dao","children":[{"title":"demo","children":[{"title":"DemoDao.java <span style='color:#111;'> 695B </span>","children":null,"spread":false},{"title":"impl","children":[{"title":"DemoDaoImpl.java <span style='color:#111;'> 1.48KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":"mapper","children":[{"title":"demo","children":[{"title":"DemoMapper.java <span style='color:#111;'> 310B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"controller","children":[{"title":"DemoController.java <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false}],"spread":true},{"title":"service","children":[{"title":"scc","children":null,"spread":false},{"title":"business","children":null,"spread":false},{"title":"user","children":null,"spread":false},{"title":"demo","children":[{"title":"IDemoService.java <span style='color:#111;'> 773B </span>","children":null,"spread":false},{"title":"impl","children":[{"title":"DemoServiceImpl.java <span style='color:#111;'> 1.58KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"order","children":null,"spread":false}],"spread":false},{"title":"entity","children":[{"title":"scc","children":null,"spread":false},{"title":"business","children":null,"spread":false},{"title":"Page.java <span style='color:#111;'> 1.29KB </span>","children":null,"spread":false},{"title":"user","children":null,"spread":false},{"title":"order","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"common","children":[{"title":"Cons.java <span style='color:#111;'> 313B </span>","children":null,"spread":false},{"title":"DataSourceContextHolder.java <span style='color:#111;'> 712B </span>","children":null,"spread":false},{"title":"util","children":[{"title":"BeanTool.java <span style='color:#111;'> 4.53KB </span>","children":null,"spread":false},{"title":"DateUtil.java <span style='color:#111;'> 19.92KB </span>","children":null,"spread":false}],"spread":false},{"title":"DynamicDataSource.java <span style='color:#111;'> 424B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

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