How to config default datasource in 5.0.0 ?
How to config default datasource in 5.0.0 ?
In Shardingsphere-Proxy 4.1.1, there is a defaultDataSourceName , but can't be use in 5.0.0 :
Caused by: Cannot create property=defaultDataSourceName for JavaBean=org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfigura
tion@45ca843
in 'reader', line 115, column 3:
- !SHARDING
^
Unable to find property 'defaultDataSourceName' on class: org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration
in 'reader', line 116, column 26:
defaultDataSourceName: ds_0
^
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:312)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:189)
at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:345)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:182)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructSequenceStep2(BaseConstructor.java:275)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructSequence(BaseConstructor.java:246)
at org.yaml.snakeyaml.constructor.Constructor$ConstructSequence.construct(Constructor.java:536)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:182)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:297)
5.0.0 version is under develop status. You can track it for the first release version and the API will be stable.
@tristaZero
There is no need to configure tables without sharding, ss will host all the tables in the user configuration ds, and when routing, find the tables involved in sql and perform correct routing.
But what about tables created without shardingsphere after shardingsphere started ?
And what about use shardingsphere-jdbc?
@lwtdev If the ShardingSphere service is running, why do not you create table with ShardingSphere? Maybe you wanna create a non-sharding table?