Spring Boot Starter Configuration

Introduction

ShardingSphere-JDBC provides official Spring Boot Starter to make convenient for developers to integrate ShardingSphere-JDBC and Spring Boot.

Data Source Configuration

spring.shardingsphere.schema.name= # JDBC data source alias, this parameter is optional. If it is not configured, logic_db is used as the schemaName by default.

spring.shardingsphere.datasource.names= # Data source name, multiple data sources are separated by commas

spring.shardingsphere.datasource.<datasource-name>.type= # Database connection pool type name
spring.shardingsphere.datasource.<datasource-name>.driver-class-name= # Database driver class name
spring.shardingsphere.datasource.<datasource-name>.jdbc-url= # Database URL connection
spring.shardingsphere.datasource.<datasource-name>.username= # Database username
spring.shardingsphere.datasource.<datasource-name>.password= # Database password
spring.shardingsphere.datasource.<datasource-name>.xxx= # Other properties of database connection pool

Rule Configuration

spring.shardingsphere.rules.<rule-type>.xxx= # rule configurations
  # ... Specific rule configurations

Please refer to specific rule configuration for more details.

Properties Configuration

spring.shardingsphere.props.xxx.xxx= # Properties key and value

Please refer to Properties Configuration for more details about type of algorithm.