[{"title":"( 46 个子文件 38KB ) SpringBoot整合Sharding-JDBC,实现从数据库加载sharding-jdbc数据源,实现多种数据库数据源切换,数据库方言动态切换","children":[{"title":"sharding-jdbc-demo","children":[{"title":"sharding-jdbc-datasource","children":[{"title":"sharding-jdbc-datasource.iml <span style='color:#111;'> 81B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"test","children":[{"title":"java","children":null,"spread":false}],"spread":true},{"title":"main","children":[{"title":"resources","children":[{"title":"application.properties <span style='color:#111;'> 589B </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"hyy","children":[{"title":"sharding","children":[{"title":"jdbc","children":[{"title":"datasource","children":[{"title":"service","children":[{"title":"CodeService.java <span style='color:#111;'> 163B </span>","children":null,"spread":false},{"title":"impl","children":[{"title":"CodeServiceImpl.java <span style='color:#111;'> 779B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"ShardingJdbcDataSourceApplication.java <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false},{"title":"constant","children":[{"title":"DatabaseType.java <span style='color:#111;'> 357B </span>","children":null,"spread":false}],"spread":false},{"title":"controller","children":[{"title":"CodeController.java <span style='color:#111;'> 768B </span>","children":null,"spread":false}],"spread":false},{"title":"util","children":[{"title":"DynamicDataSource.java <span style='color:#111;'> 560B </span>","children":null,"spread":false}],"spread":false},{"title":"config","children":[{"title":"DynamicDataSourceConfig.java <span style='color:#111;'> 6.30KB </span>","children":null,"spread":false}],"spread":false},{"title":"template","children":[{"title":"DataSourceTemplate.java <span style='color:#111;'> 9.21KB </span>","children":null,"spread":false},{"title":"CustomSqlSessionTemplate.java <span style='color:#111;'> 10.87KB </span>","children":null,"spread":false}],"spread":false},{"title":"algorithm","children":[{"title":"AbstractShardingAlgorithm.java <span style='color:#111;'> 882B </span>","children":null,"spread":false},{"title":"ModuloDatabaseShardingAlgorithm.java <span style='color:#111;'> 857B </span>","children":null,"spread":false},{"title":"ModuloTableShardingAlgorithm.java <span style='color:#111;'> 538B </span>","children":null,"spread":false}],"spread":false},{"title":"handler","children":[{"title":"DataSourceHandler.java <span style='color:#111;'> 711B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 1.33KB </span>","children":null,"spread":false}],"spread":true},{"title":".idea","children":[{"title":"misc.xml <span style='color:#111;'> 526B </span>","children":null,"spread":false},{"title":"compiler.xml <span style='color:#111;'> 754B </span>","children":null,"spread":false},{"title":"uiDesigner.xml <span style='color:#111;'> 8.71KB </span>","children":null,"spread":false},{"title":"workspace.xml <span style='color:#111;'> 37.49KB </span>","children":null,"spread":false},{"title":"encodings.xml <span style='color:#111;'> 576B </span>","children":null,"spread":false},{"title":"inspectionProfiles","children":[{"title":"Project_Default.xml <span style='color:#111;'> 1.67KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"sharding-jdbc-base","children":[{"title":"src","children":[{"title":"test","children":[{"title":"java","children":null,"spread":false}],"spread":true},{"title":"main","children":[{"title":"resources","children":null,"spread":false},{"title":"java","children":[{"title":"com.hyy.sharding.jdbc.base","children":[{"title":"properties","children":[{"title":"BaseDataSourceProperties.java <span style='color:#111;'> 311B </span>","children":null,"spread":false},{"title":"DataSourceProperties.java <span style='color:#111;'> 3.64KB </span>","children":null,"spread":false}],"spread":true},{"title":"util","children":[{"title":"DataSourceBuildUtil.java <span style='color:#111;'> 2.03KB </span>","children":null,"spread":false}],"spread":true},{"title":"entity","children":[{"title":"DataSourceDetailEntity.java <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"DataSourceEntity.java <span style='color:#111;'> 2.56KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 516B </span>","children":null,"spread":false}],"spread":true},{"title":"base-datasource-service","children":[{"title":"src","children":[{"title":"test","children":[{"title":"java","children":null,"spread":false}],"spread":true},{"title":"main","children":[{"title":"resources","children":[{"title":"application.properties <span style='color:#111;'> 1.06KB </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"hyy","children":[{"title":"base","children":[{"title":"datasource","children":[{"title":"service","children":[{"title":"service","children":[{"title":"BaseDataSourceService.java <span style='color:#111;'> 250B </span>","children":null,"spread":false},{"title":"impl","children":[{"title":"BaseDataSourceServiceImpl.java <span style='color:#111;'> 719B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"controller","children":[{"title":"BaseDataSourceController.java <span style='color:#111;'> 907B </span>","children":null,"spread":false}],"spread":false},{"title":"config","children":[{"title":"DataSourceConfig.java <span style='color:#111;'> 582B </span>","children":null,"spread":false}],"spread":false},{"title":"BaseDataSourceServiceApplication.java <span style='color:#111;'> 778B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 1.29KB </span>","children":null,"spread":false},{"title":"base-datasource-service.iml <span style='color:#111;'> 81B </span>","children":null,"spread":false}],"spread":true},{"title":"sharding-jdbc-dao","children":[{"title":"src","children":[{"title":"test","children":[{"title":"java","children":null,"spread":false}],"spread":true},{"title":"main","children":[{"title":"resources","children":[{"title":"com","children":[{"title":"hyy","children":[{"title":"sharding","children":[{"title":"jdbc","children":[{"title":"mapper","children":[{"title":"CodeMapper.xml <span style='color:#111;'> 502B </span>","children":null,"spread":false},{"title":"DataSourceMapper.xml <span style='color:#111;'> 1.92KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"hyy","children":[{"title":"sharding","children":[{"title":"jdbc","children":[{"title":"mapper","children":[{"title":"DataSourceMapper.java <span style='color:#111;'> 387B </span>","children":null,"spread":false},{"title":"CodeMapper.java <span style='color:#111;'> 131B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 735B </span>","children":null,"spread":false}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 6.04KB </span>","children":null,"spread":false},{"title":"registration-center-service","children":[{"title":"src","children":[{"title":"test","children":[{"title":"java","children":null,"spread":false}],"spread":true},{"title":"main","children":[{"title":"resources","children":[{"title":"application.properties <span style='color:#111;'> 276B </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"hyy","children":[{"title":"registration","children":[{"title":"center","children":[{"title":"service","children":[{"title":"RegistrationCenterServiceApplication.java <span style='color:#111;'> 604B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false},{"title":"registration-center-service.iml <span style='color:#111;'> 81B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]