ShardingJDBC 开发框架简单使用,具备以下功能:
- 简单策略进行数据库分片存储
- 提供自定义分片策略方法
- v0.1.0 版本集成的 ShardingJDBC 为 v4.1.1,v0.2.0 版本集成的 ShardingJDBC 为 v5.4.1
- 不同版本的 ShardingJDBC yml 配置项区别较大,出现问题比较难以排查,需要特别注意不同版本的配置写法,参考官网写法
- v4.1.1 版本的使用文档参阅:https://shardingsphere.apache.org/document/4.1.1/cn/manual/sharding-jdbc/configuration/config-yaml/#%E9%85%8D%E7%BD%AE%E9%A1%B9%E8%AF%B4%E6%98%8E
- 最新版本使用文档见:https://shardingsphere.apache.org/document/current/cn/overview/
- 配置及说明示例见:https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/sharding/
- 算法说明见:https://shardingsphere.apache.org/document/current/cn/user-manual/common-config/builtin-algorithm/sharding/
- 低版本 ShardingJDBC 升级到高版本可参考:https://blog.csdn.net/qq_33204709/article/details/132586967
- ShardingJDBC 版本兼容性太差了,而且官方文档用法说明较为简单,比较难以上手