The Java API is the most complex and flexible configuration method, which is suitable for the scenarios requiring dynamic configuration through programming.

    Usage

    ShardingSphere-JDBC Java API consists of database name, mode configuration, data source map, rule configurations and properties.

    Please refer to for more mode details.

    Please refer to Data Source Confiugration for more data source details.

    Developer can choose to use native JDBC or ORM frameworks such as JPA, Hibernate or MyBatis through the DataSource.

    Take native JDBC usage as an example: