You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/01/27 07:12:33 UTC
[GitHub] [shardingsphere] climy007 edited a comment on issue #15086: Cannot subclass final class org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource
climy007 edited a comment on issue #15086:
URL: https://github.com/apache/shardingsphere/issues/15086#issuecomment-1022795331
> you provide a demo or show your conf
`shardingsphere:
mode:
type: Standalone
repository:
type: File
props:
sql:
show: true
datasource:
names: db1,db2
db1:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:6666/db1?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
username: root
password: 123
db2:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:6666/db2?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
username: root
password: 123
sharding:
default-data-source-name: db1
binding-tables: t_goods
tables:
t_goods:
actual-data-nodes: db$->{1..2}.t_goods
database-strategy:
inline:
sharding-column: id
algorithm-expression: db$->{id % 2 + 1}
key-generator:
column: id
type: SNOWFLAKE
table-strategy:
none:`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org