<h3 dir="auto">sharind-proxy start error message:</h3>
<p dir="auto"><code class="notranslate">Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to org.apache.shardingsphere.infra.yaml.config.pojo.YamlRuleConfiguration at org.apache.shardingsphere.infra.yaml.config.swapper.YamlRuleConfigurationSwapperEngine$$Lambda$16/557023567.apply(Unknown Source) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.Iterator.forEachRemaining(Iterator.java:116) at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at org.apache.shardingsphere.infra.yaml.config.swapper.YamlRuleConfigurationSwapperEngine.swapToRuleConfigurations(YamlRuleConfigurationSwapperEngine.java:59) at org.apache.shardingsphere.proxy.backend.config.yaml.swapper.YamlProxyConfigurationSwapper.swapDatabaseConfigurations(YamlProxyConfigurationSwapper.java:63) at org.apache.shardingsphere.proxy.backend.config.yaml.swapper.YamlProxyConfigurationSwapper.swap(YamlProxyConfigurationSwapper.java:52) at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.createContextManager(BootstrapInitializer.java:62) at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.init(BootstrapInitializer.java:55) at org.apache.shardingsphere.proxy.Bootstrap.main(Bootstrap.java:50)</code></p>
<h3 dir="auto">server.xml：</h3>
<p dir="auto">`rules:<br>
users:<br>
- root@%:root<br>
- sharding@:sharding<br>
provider:<br>
type: ALL_PERMITTED</p>
<p dir="auto">props:<br>
max-connections-size-per-query: 1<br>
kernel-executor-size: 16  # Infinite by default.<br>
proxy-frontend-flush-threshold: 128  # The default value is 128.<br>
proxy-hint-enabled: false<br>
sql-show: true<br>
sql-simple: true<br>
check-table-metadata-enabled: false<br>
show-process-list-enabled: false<br>
proxy-backend-query-fetch-size: -1<br>
check-duplicate-table-enabled: false<br>
proxy-frontend-executor-size: 0<br>
proxy-backend-executor-suitable: OLAP<br>
proxy-frontend-max-connections: 0<br>
sql-federation-enabled: false<br>
proxy-backend-driver-type: JDBC<br>
proxy-mysql-default-version: 5.7.22<br>
proxy-default-port: 3307<br>
proxy-netty-backlog: 1024<br>
`</p>
<h3 dir="auto">config-sharding.xml：</h3>
<p dir="auto">`databaseName: decard_pay_dev</p>
<p dir="auto">dataSources:<br>
ds0:<br>
url: jdbc:mysql://127.0.0.1:3306/decard_pay_dev?serverTimezone=UTC&amp;useSSL=false<br>
username: root<br>
password: root<br>
connectionTimeoutMilliseconds: 30000<br>
idleTimeoutMilliseconds: 60000<br>
maxLifetimeMilliseconds: 1800000<br>
maxPoolSize: 50</p>
<p dir="auto">rules:<br>
sharding:<br>
tables:<br>
dp_trade_payment_order:<br>
# 配置数据节点<br>
actual-data-nodes: ds0.dp_trade_payment_order_$-&gt;{2020..2025}<em>0$-&gt;{1..4}<br>
# 分表策略<br>
table-strategy:<br>
complex:<br>
sharding-columns: platform_order_no,order_time,pay_success_time<br>
sharding-algorithm-name: order-algorithm<br>
dp_trade_payment_record:<br>
# 配置数据节点<br>
actual-data-nodes: ds0.dp_trade_payment_record</em><math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="72ffc9aea89ab6a281958026c17d9536">$-&amp;gt;{2020..2025}_0$</math-renderer>-&gt;{1..4}<br>
# 分表策略<br>
table-strategy:<br>
complex:<br>
sharding-columns: platform_order_no,pay_success_time<br>
sharding-algorithm-name: order-algorithm<br>
sharding-algorithms:<br>
order-algorithm:<br>
type: CLASS_BASED<br>
props:<br>
strategy: COMPLEX<br>
algorithmClassName: com.decard.sharding.config.OrderComplexKeysShardingAlgorithm<br>
binding-tables: dp_trade_payment_order,dp_trade_payment_record<br>
`</p>
<p dir="auto">Hello, can we pay for the scheme of multi tenant dynamic database creation? How to operate? Is there any actual case?<br>
I want to divide the database dynamically according to the tenants. The tenants are created dynamically through the project, not written in the configuration file. Thank you<br>
中文解释:<br>
您好, 请问咱们可以支付多租户动态创建数据库的方案吗, 怎么操作, 有实际案例吗?<br>
我是想按照租户去动态进行分库, 租户是通过项目动态创建, 不是写死在配置文件中的, 谢谢</p>