apache / shardingsphere

Distributed SQL transaction & query engine for data sharding, scaling, encryption, and more - on any database.
Apache License 2.0
19.83k stars 6.71k forks source link

How to add a new features and use yaml config to configuration? #33029

Closed dobet closed 2 days ago

dobet commented 2 days ago

Question

For English only, other languages will not accept.

Before asking a question, make sure you have:

Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will close it.

I create a new features, and write yaml to parse yaml file.

also add META-INFO.services

org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlDataNodeRuleConfigurationSwapper
org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlREuleConfigurationSwapper

But when I run Proxy, get an error:

Caused by: org.yaml.snakeyaml.error.YAMLException: Invalid tag:

I implements YamlRuleConfigurationSwapper, getRuleTagName and getOrder getTypeClass. and write unittest to test yaml parse success.

Have something needed add in proxy?