Sharding
Namespace: http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding-5.2.1.xsd
<sharding:rule />
<sharding:table-rule />
Name | Type | Description |
---|---|---|
logic-table | Attribute | Logic table name |
actual-data-nodes | Attribute | Describe data source names and actual tables, delimiter as point, multiple data nodes separated with comma, support inline expression. Absent means sharding databases only. |
actual-data-sources | Attribute | Data source names for auto sharding table |
database-strategy-ref | Attribute | Database strategy name for standard sharding table |
table-strategy-ref | Attribute | Table strategy name for standard sharding table |
sharding-strategy-ref | Attribute | sharding strategy name for auto sharding table |
key-generate-strategy-ref | Attribute | Key generate strategy name |
audit-strategy-ref | Attribute | Sharding audit strategy name |
<sharding:binding-table-rules />
Name | Type | Description |
---|---|---|
binding-table-rule (+) | Tag | Binding table rule configuration |
<sharding:binding-table-rule />
Name | Type | Description |
---|---|---|
logic-tables | Attribute | Binding table name, multiple tables separated with comma |
<sharding:broadcast-table-rules />
Name | Type | Description |
---|---|---|
broadcast-table-rule (+) | Tag | Broadcast table rule configuration |
<sharding:standard-strategy />
Name | Type | Description |
---|---|---|
id | Attribute | Standard sharding strategy name |
sharding-column | Attribute | Sharding column name |
algorithm-ref | Attribute | Sharding algorithm name |
<sharding:complex-strategy />
Name | Type | Description |
---|---|---|
id | Attribute | Complex sharding strategy name |
sharding-columns | Attribute | Sharding column names, multiple columns separated with comma |
algorithm-ref | Attribute | Sharding algorithm name |
<sharding:hint-strategy />
Name | Type | Description |
---|---|---|
id | Attribute | Hint sharding strategy name |
algorithm-ref | Attribute | Sharding algorithm name |
<sharding:none-strategy />
Name | Type | Description |
---|---|---|
id | Attribute | Sharding strategy name |
<sharding:key-generate-strategy />
<sharding:audit-strategy />
Name | Type | Description |
---|---|---|
id | Attribute | Sharding audit strategy name |
allow-hint-disable | Attribute | Enable or disable sharding audit hint |
auditors | Tag | Sharding audit algorithm name |
Name | Type | Description |
---|---|---|
auditor | Tag | Sharding audit algorithm name |
<sharding:auditor />
Name | Type | Description |
---|---|---|
algorithm-ref | Attribute | Sharding audit algorithm name |
<sharding:sharding-algorithm />
Name | Type | Description |
---|---|---|
id | Attribute | Sharding algorithm name |
type | Attribute | Sharding algorithm type |
props (?) | Tag | Sharding algorithm properties |
<sharding:key-generate-algorithm />
<sharding:audit-algorithm />
Name | Type | Description |
---|---|---|
id | Attribute | Sharding audit algorithm name |
type | Attribute | Sharding audit algorithm type |
props (?) | Tag | Sharding audit algorithm properties |
Please refer to , Built-in Key Generate Algorithm List and for more details about type of algorithm.
- Start the Spring program, the configuration will be loaded automatically, and the ShardingSphereDataSource will be initialized.