GithubHelp home page GithubHelp logo

imhuzi / mybatis-plus-sharding-jdbc-spring-boot-starter Goto Github PK

View Code? Open in Web Editor NEW
63.0 4.0 32.0 13 KB

mybatis-plus-sharding-jdbc-spring-boot-starter

License: Apache License 2.0

Java 100.00%
mybatis-plus sharding-sphere sharding-jdbc mybatis-plus-sharding-jdbc

mybatis-plus-sharding-jdbc-spring-boot-starter's Introduction

mybatis-plus 读写分离+分库分表

项目基于: https://gitee.com/baomidou/mybatisplus-sharding-jdbc

因为原项目中提到的 sharding-jdbc-mybatis-plus-spring-boot-starter 没有再更新,所以产生了此项目

dependencies

  • com.baomidou:mybatis-plus:2.2.0
  • sharding-jdbc-core-spring-boot-starter:2.0.3
  • spring-boot-starter:1.5.10.RELEASE

尽量保持以上依赖跟官方最近稳定版同步

声明

项目 使用了 mybatis-plus 的 groupId,如果觉得不妥 可以联系我修改

使用

sharding.jdbc:
  datasource:
    names: ds_master_0,ds_master_0_slave_0
    ds_master_0:
      type: com.zaxxer.hikari.HikariDataSource
      driverClassName: com.mysql.jdbc.Driver
      jdbcUrl: jdbc:mysql://192.168.1.1:3306/demo?useSSL=false&useUnicode=true&characterEncoding=utf8&autoReconnect=true
      username: root
      password: 111111
      maxPoolSize: 20
    ds_master_0_slave_0:
      type: com.zaxxer.hikari.HikariDataSource
      driverClassName: com.mysql.jdbc.Driver
      jdbcUrl: jdbc:mysql://192.168.1.2:3306/demo?useSSL=false&useUnicode=true&characterEncoding=utf8&autoReconnect=true
      username: xxx
      password: 111111
      maxPoolSize: 20
  config:
    masterslave:
      name: ds_ms
      master-data-source-name: ds_master_0
      slave-data-source-names: ds_master_0_slave_0

这里数据源根据自己需求定,详细的配置见 Sharding-Jdbc

mybatis-plus-sharding-jdbc-spring-boot-starter's People

Contributors

imhuzi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.