mirror of
https://github.com/201206030/novel-plus.git
synced 2025-04-26 17:20:52 +00:00
更新
This commit is contained in:
parent
0e2e6229cd
commit
c1d485c42b
Binary file not shown.
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 185 KiB |
@ -35,19 +35,19 @@ spring:
|
|||||||
sharding:
|
sharding:
|
||||||
jdbc:
|
jdbc:
|
||||||
datasource:
|
datasource:
|
||||||
names: ds0 #,ds1
|
names: ds0 ,ds1
|
||||||
ds0:
|
ds0:
|
||||||
type: com.zaxxer.hikari.HikariDataSource
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
jdbc-url: jdbc:mysql://localhost:3306/novel_plus?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
jdbc-url: jdbc:mysql://localhost:3306/novel_plus?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||||
username: root
|
username: root
|
||||||
password: test123456
|
password: test123456
|
||||||
# ds1:
|
ds1:
|
||||||
# type: com.alibaba.druid.pool.DruidDataSource
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
# driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# url: jdbc:mysql://localhost:3306/novel_plus2
|
jdbc-url: jdbc:mysql://localhost:3306/novel_plus?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||||
# username: root
|
username: root
|
||||||
# password: test123456
|
password: test123456
|
||||||
config:
|
config:
|
||||||
sharding:
|
sharding:
|
||||||
props:
|
props:
|
||||||
@ -55,15 +55,16 @@ sharding:
|
|||||||
tables:
|
tables:
|
||||||
book_content: #book_content表
|
book_content: #book_content表
|
||||||
key-generator-column-name: id #主键
|
key-generator-column-name: id #主键
|
||||||
actual-data-nodes: ds${0}.book_content${0..9} #数据节点
|
actual-data-nodes: ds${0..1}.book_content${0..1} #数据节点
|
||||||
# database-strategy: #分库策略
|
database-strategy: #分库策略
|
||||||
# inline:
|
inline:
|
||||||
# sharding-column: book_id
|
sharding-column: index_id
|
||||||
# algorithm-expression: ds${book_id % 10}
|
algorithm-expression: ds${index_id % 2}
|
||||||
table-strategy: #分表策略
|
table-strategy: #分表策略
|
||||||
inline:
|
inline:
|
||||||
shardingColumn: index_id
|
shardingColumn: index_id
|
||||||
algorithm-expression: book_content${index_id % 10}
|
algorithm-expression: book_content${index_id % 2}
|
||||||
|
default-data-source-name: db0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
</commentGenerator>
|
</commentGenerator>
|
||||||
<jdbcConnection
|
<jdbcConnection
|
||||||
connectionURL="jdbc:mysql://127.0.0.1:3306/novel_plus?tinyInt1isBit=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true"
|
connectionURL="jdbc:mysql://127.0.0.1:3306/novel_plus?tinyInt1isBit=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true"
|
||||||
driverClass="com.mysql.jdbc.Driver" password=""
|
driverClass="com.mysql.jdbc.Driver" password="test123456"
|
||||||
userId="root" />
|
userId="root" />
|
||||||
|
|
||||||
<!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer, 为 true时把JDBC DECIMAL
|
<!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer, 为 true时把JDBC DECIMAL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user