Sharding-jdbc 5.1.2案例

2022年7月7日 406点热度 0人点赞 0条评论

简介

sharding-jdbc案例,版本5.1.2

springboot + mybatis-plus + sharding-jdbc

项目地址:sharding-jdbc-example

模块说明

  • read-write

    简单的读写分离

  • db-sharding

    简单的不同表在不同库配置

    tb_order表使用sharding-jdbc的雪花算法生成id

    tb_storage表使用mybatis-plus生成uuid

  • db-read-write-sharding

    不同表在不同库配置 + 静态读写分离

  • table-sharding

    不分库,只分表案例

  • table-read-write-sharding

    不分库,只分表+读写分离案例

  • db-table-sharding

    分库分表(顺便测试下本地事务)

  • db-table-read-write-sharding

    分库分表 + 读写分离

最后

个人认为此项目代码和注释足以让人看懂,无需博客描述加以赘述。

王谷雨

一个苟且偷生的java程序员

文章评论