Git Product home page Git Product logo

shardingjdbcstudy's Introduction

Springboot+MybatisPlus+ShardingJdbc学习

项目是自己学习ShardingJdbc的一些简单的使用。 项目分四个子模块,由易到难,一步一步实现这三个的集成,分别如下:

1 MybatisPlusStudy模块

此模块是其他的项目的第一步,简单的用Springboot集成MybatisPlus。

2 ShardingJdbcTableStrategyStudy

此模块用Springboot+MybatisPlus+ShardingJdbc,实现单库的分表。

application中集成了两种分表方式,分片键都是order_id,生成规则是用ShardingJdbc的雪花算法。

第一种是根据order_id的奇数,偶数将分表;

第二种是根据order_id的雪花算法反向推出生成时间,按照年月分表;

3 ShardingJdbcDatabaseStrategyStudy

此模块用Springboot+MybatisPlus+ShardingJdbc实现分库分表。

4 ReadAndWriteSeparateStydy

此模块用Springboot+MybatisPlus+ShardingJdbc实现读写分离。

更复杂的使用请参考ShardingJdbc官方文档

shardingjdbcstudy's People

Contributors

shone5499 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.