Closed 790477691 closed 9 months ago
@790477691 It may be that the version of snakeyaml that springframework depends on is too low, please try to specify the version of snakeyaml in the pom
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.33</version>
</dependency>
I replaced it with this configuration, but it still doesn't work
<!-- https://mvnrepository.com/artifact/org.apache.shardingsphere/shardingsphere-jdbc-core -->
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core</artifactId>
<version>5.2.1</version>
<exclusions>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.yaml/snakeyaml -->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.33</version>
</dependency>
[INFO] -----------< com.lxz.shardingjdbcspring:shardingjdbcspring >------------
[INFO] Building shardingjdbcspring 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ shardingjdbcspring ---
[INFO] com.lxz.shardingjdbcspring:shardingjdbcspring:jar:1.0-SNAPSHOT
[INFO] +- com.alibaba:druid:jar:1.1.20:compile
[INFO] +- com.oracle.database.nls:orai18n:jar:11.2.0.4:compile
[INFO] +- org.apache.shardingsphere:shardingsphere-jdbc-core:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-transaction-core:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-transaction-api:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-infra-executor:jar:5.2.1:compile
[INFO] | | \- io.vertx:vertx-mysql-client:jar:4.3.3:compile
[INFO] | | +- io.vertx:vertx-core:jar:4.3.3:compile
[INFO] | | | +- io.netty:netty-common:jar:4.1.78.Final:compile
[INFO] | | | +- io.netty:netty-buffer:jar:4.1.78.Final:compile
[INFO] | | | +- io.netty:netty-transport:jar:4.1.78.Final:compile
[INFO] | | | +- io.netty:netty-handler:jar:4.1.78.Final:compile
[INFO] | | | | +- io.netty:netty-transport-native-unix-common:jar:4.1.78.Final:compile
[INFO] | | | | \- io.netty:netty-codec:jar:4.1.78.Final:compile
[INFO] | | | +- io.netty:netty-handler-proxy:jar:4.1.78.Final:compile
[INFO] | | | | \- io.netty:netty-codec-socks:jar:4.1.78.Final:compile
[INFO] | | | +- io.netty:netty-codec-http:jar:4.1.78.Final:compile
[INFO] | | | +- io.netty:netty-codec-http2:jar:4.1.78.Final:compile
[INFO] | | | +- io.netty:netty-resolver:jar:4.1.78.Final:compile
[INFO] | | | +- io.netty:netty-resolver-dns:jar:4.1.78.Final:compile
[INFO] | | | | \- io.netty:netty-codec-dns:jar:4.1.78.Final:compile
[INFO] | | | \- com.fasterxml.jackson.core:jackson-core:jar:2.13.2:compile
[INFO] | | \- io.vertx:vertx-sql-client:jar:4.3.3:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-sql-parser-sql92:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-sql-parser-engine:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-sql-parser-spi:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-sql-parser-statement:jar:5.2.1:compile
[INFO] | | +- org.antlr:antlr4-runtime:jar:4.9.2:compile
[INFO] | | \- com.github.ben-manes.caffeine:caffeine:jar:2.9.2:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-sql-parser-mysql:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-sql-parser-postgresql:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-sql-parser-oracle:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-sql-parser-sqlserver:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-sql-parser-opengauss:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-mysql-dialect-exception:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-dialect-exception-core:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-postgresql-dialect-exception:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-authority-core:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-authority-api:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-single-table-core:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-single-table-api:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-infra-route:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-traffic-core:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-infra-common:jar:5.2.1:compile
[INFO] | | | \- org.apache.shardingsphere:shardingsphere-infra-util:jar:5.2.1:compile
[INFO] | | | \- org.apache.groovy:groovy:jar:4.0.3:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-infra-binder:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-traffic-api:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-infra-context:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-distsql-parser:jar:5.2.1:compile
[INFO] | | | \- org.apache.shardingsphere:shardingsphere-distsql-statement:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-sql-translator-core:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-sql-translator-api:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-standalone-mode-core:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-mode-core:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-standalone-mode-repository-api:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-standalone-mode-repository-jdbc-h2:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-standalone-mode-repository-jdbc-core:jar:5.2.1:compile
[INFO] | | \- com.zaxxer:HikariCP:jar:3.4.2:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-cluster-mode-core:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-cluster-mode-repository-api:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-sharding-core:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-sharding-api:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-data-pipeline-core:jar:5.2.1:compile
[INFO] | | | +- org.apache.shardingsphere:shardingsphere-data-pipeline-api:jar:5.2.1:compile
[INFO] | | | | \- org.apache.commons:commons-lang3:jar:3.8:compile
[INFO] | | | \- org.apache.shardingsphere:shardingsphere-cluster-mode-repository-zookeeper-curator:jar:5.2.1:compile
[INFO] | | | +- org.apache.curator:curator-framework:jar:5.1.0:compile
[INFO] | | | +- org.apache.curator:curator-client:jar:5.1.0:compile
[INFO] | | | | \- org.apache.zookeeper:zookeeper:jar:3.6.0:compile
[INFO] | | | | +- commons-lang:commons-lang:jar:2.6:compile
[INFO] | | | | +- org.apache.zookeeper:zookeeper-jute:jar:3.6.0:compile
[INFO] | | | | +- org.apache.yetus:audience-annotations:jar:0.5.0:compile
[INFO] | | | | \- io.netty:netty-transport-native-epoll:jar:4.1.45.Final:compile
[INFO] | | | \- org.apache.curator:curator-recipes:jar:5.1.0:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-infra-rewrite:jar:5.2.1:compile
[INFO] | | | \- org.apache.shardingsphere:shardingsphere-sql-translator-native-provider:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-infra-merge:jar:5.2.1:compile
[INFO] | | | \- org.apache.calcite:calcite-linq4j:jar:1.32.0:compile
[INFO] | | | +- org.apiguardian:apiguardian-api:jar:1.1.2:compile
[INFO] | | | \- org.apache.calcite.avatica:avatica-core:jar:1.22.0:compile
[INFO] | | | +- org.apache.calcite.avatica:avatica-metrics:jar:1.22.0:compile
[INFO] | | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.10.0:compile
[INFO] | | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.10.0:compile
[INFO] | | | +- com.google.protobuf:protobuf-java:jar:3.17.1:compile
[INFO] | | | +- org.apache.httpcomponents.client5:httpclient5:jar:5.1.3:runtime
[INFO] | | | | \- org.apache.httpcomponents.core5:httpcore5-h2:jar:5.1.3:runtime
[INFO] | | | \- org.apache.httpcomponents.core5:httpcore5:jar:5.1.3:runtime
[INFO] | | +- org.apache.shardingsphere:shardingsphere-system-datetime:jar:5.2.1:compile
[INFO] | | | \- org.apache.shardingsphere:shardingsphere-infra-datetime-spi:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-sharding-cosid:jar:5.2.1:compile
[INFO] | | | \- me.ahoo.cosid:cosid-core:jar:1.14.4:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-sharding-nanoid:jar:5.2.1:compile
[INFO] | | \- com.aventrix.jnanoid:jnanoid:jar:2.0.0:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-sharding-cache:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-readwrite-splitting-core:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-readwrite-splitting-api:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-db-discovery-core:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-db-discovery-api:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-db-discovery-mysql:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-db-discovery-opengauss:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-schedule-core:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere.elasticjob:elasticjob-lite-core:jar:3.0.1:compile
[INFO] | | | +- org.apache.shardingsphere.elasticjob:elasticjob-api:jar:3.0.1:compile
[INFO] | | | +- org.apache.shardingsphere.elasticjob:elasticjob-infra-common:jar:3.0.1:compile
[INFO] | | | +- org.apache.shardingsphere.elasticjob:elasticjob-registry-center:jar:3.0.1:compile
[INFO] | | | +- org.apache.shardingsphere.elasticjob:elasticjob-simple-executor:jar:3.0.1:compile
[INFO] | | | | \- org.apache.shardingsphere.elasticjob:elasticjob-executor-kernel:jar:3.0.1:compile
[INFO] | | | | \- org.apache.shardingsphere.elasticjob:elasticjob-error-handler-general:jar:3.0.1:compile
[INFO] | | | | \- org.apache.shardingsphere.elasticjob:elasticjob-error-handler-spi:jar:3.0.1:compile
[INFO] | | | +- org.apache.shardingsphere.elasticjob:elasticjob-dataflow-executor:jar:3.0.1:compile
[INFO] | | | +- org.apache.shardingsphere.elasticjob:elasticjob-script-executor:jar:3.0.1:compile
[INFO] | | | | \- org.apache.commons:commons-exec:jar:1.3:compile
[INFO] | | | +- org.apache.shardingsphere.elasticjob:elasticjob-http-executor:jar:3.0.1:compile
[INFO] | | | +- org.apache.shardingsphere.elasticjob:elasticjob-tracing-rdb:jar:3.0.1:compile
[INFO] | | | | \- org.apache.shardingsphere.elasticjob:elasticjob-tracing-api:jar:3.0.1:compile
[INFO] | | | +- com.google.code.gson:gson:jar:2.6.1:compile
[INFO] | | | \- org.quartz-scheduler:quartz:jar:2.3.2:compile
[INFO] | | | \- com.mchange:mchange-commons-java:jar:0.2.15:compile
[INFO] | | \- org.apache.shardingsphere.elasticjob:elasticjob-lite-lifecycle:jar:3.0.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-encrypt-core:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-encrypt-api:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-encrypt-sm:jar:5.2.1:compile
[INFO] | | | \- org.bouncycastle:bcprov-jdk15on:jar:1.70:compile
[INFO] | | \- commons-codec:commons-codec:jar:1.15:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-shadow-core:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-shadow-api:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-sql-federation-core:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-sql-federation-api:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-sql-federation-executor-advanced:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-sql-federation-executor-core:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-sql-federation-optimizer:jar:5.2.1:compile
[INFO] | | \- org.apache.calcite:calcite-core:jar:1.32.0:compile
[INFO] | | +- org.locationtech.jts:jts-core:jar:1.19.0:compile
[INFO] | | +- org.locationtech.jts.io:jts-io-common:jar:1.19.0:compile
[INFO] | | | \- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] | | +- org.locationtech.proj4j:proj4j:jar:1.1.5:compile
[INFO] | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.13.2:runtime
[INFO] | | +- com.google.uzaygezen:uzaygezen-core:jar:0.2:runtime
[INFO] | | +- com.jayway.jsonpath:json-path:jar:2.7.0:runtime
[INFO] | | | \- net.minidev:json-smart:jar:2.4.7:runtime
[INFO] | | | \- net.minidev:accessors-smart:jar:2.4.7:runtime
[INFO] | | | \- org.ow2.asm:asm:jar:9.1:runtime
[INFO] | | +- com.yahoo.datasketches:sketches-core:jar:0.9.0:runtime
[INFO] | | | \- com.yahoo.datasketches:memory:jar:0.9.0:runtime
[INFO] | | +- net.hydromatic:aggdesigner-algorithm:jar:6.0:runtime
[INFO] | | | \- commons-logging:commons-logging:jar:1.1.3:runtime
[INFO] | | +- org.apache.commons:commons-dbcp2:jar:2.6.0:runtime
[INFO] | | | \- org.apache.commons:commons-pool2:jar:2.6.1:runtime
[INFO] | | +- commons-io:commons-io:jar:2.11.0:runtime
[INFO] | | +- org.codehaus.janino:commons-compiler:jar:3.1.8:runtime
[INFO] | | \- org.codehaus.janino:janino:jar:3.1.8:runtime
[INFO] | +- org.apache.shardingsphere:shardingsphere-sql-federation-executor-original:jar:5.2.1:compile
[INFO] | +- org.apache.shardingsphere:shardingsphere-parser-core:jar:5.2.1:compile
[INFO] | | +- org.apache.shardingsphere:shardingsphere-parser-api:jar:5.2.1:compile
[INFO] | | \- org.apache.shardingsphere:shardingsphere-infra-parser:jar:5.2.1:compile
[INFO] | +- org.apache.commons:commons-collections4:jar:4.4:compile
[INFO] | +- com.h2database:h2:jar:2.1.214:runtime
[INFO] | +- com.google.guava:guava:jar:30.0-jre:compile
[INFO] | | +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] | | +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] | | +- org.checkerframework:checker-qual:jar:3.5.0:compile
[INFO] | | \- com.google.errorprone:error_prone_annotations:jar:2.3.4:compile
[INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.7.36:compile
[INFO] | \- org.slf4j:jul-to-slf4j:jar:1.7.36:compile
[INFO] +- org.yaml:snakeyaml:jar:1.33:compile
[INFO] +- cn.easyproject:ojdbc6:jar:12.1.0.2.0:compile
[INFO] +- org.springframework:spring-test:jar:5.0.4.RELEASE:compile
[INFO] +- org.springframework:spring-context-support:jar:5.0.4.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:5.0.4.RELEASE:compile
[INFO] | \- org.springframework:spring-context:jar:5.0.4.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:5.0.4.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:5.0.4.RELEASE:compile
[INFO] +- org.springframework:spring-tx:jar:5.0.4.RELEASE:compile
[INFO] +- org.springframework:spring-core:jar:5.0.4.RELEASE:compile
[INFO] | \- org.springframework:spring-jcl:jar:5.0.4.RELEASE:compile
[INFO] +- org.springframework:spring-jdbc:jar:5.0.4.RELEASE:compile
[INFO] +- org.mybatis:mybatis-spring:jar:1.3.0:compile
[INFO] +- junit:junit:jar:4.13.2:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.slf4j:slf4j-api:jar:1.7.7:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.7:compile
[INFO] +- log4j:log4j:jar:1.2.17:compile
[INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.19.0:test
[INFO] | +- org.apache.logging.log4j:log4j-api:jar:2.19.0:test
[INFO] | \- org.apache.logging.log4j:log4j-core:jar:2.19.0:test
[INFO] \- mysql:mysql-connector-java:jar:5.1.35:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.591 s
[INFO] Finished at: 2023-01-30T08:41:30+08:00
[INFO] ------------------------------------------------------------------------
Exception in thread "main" Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@291ae
in 'reader', line 1, column 1:
databaseName: oracleSource
^
No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
in 'reader', line 37, column 5:
tables:
^
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:321)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:207)
at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:358)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:207)
at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:191)
at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:477)
at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:443)
at org.apache.shardingsphere.infra.util.yaml.YamlEngine.unmarshal(YamlEngine.java:55)
at org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory.createDataSource(YamlShardingSphereDataSourceFactory.java:61)
at Test.main(Test.java:30)
Caused by: org.yaml.snakeyaml.error.YAMLException: No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
at org.yaml.snakeyaml.constructor.Constructor$ConstructScalar.construct(Constructor.java:417)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
at org.yaml.snakeyaml.constructor.SafeConstructor.processDuplicateKeys(SafeConstructor.java:108)
at org.yaml.snakeyaml.constructor.SafeConstructor.flattenMapping(SafeConstructor.java:81)
at org.yaml.snakeyaml.constructor.SafeConstructor.flattenMapping(SafeConstructor.java:76)
at org.yaml.snakeyaml.constructor.SafeConstructor.constructSet2ndStep(SafeConstructor.java:218)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructSet(BaseConstructor.java:545)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:199)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.newInstance(Constructor.java:333)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:298)
... 11 more
I think the key is this,
No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
But why is this a problem
@RaigorJiang
org.apache.shardingsphere:shardingsphere-infra-common:5.3.1
package org.apache.shardingsphere.infra.yaml.config.pojo.rule;
import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
import org.apache.shardingsphere.infra.util.yaml.YamlConfiguration;
/**
* YAML rule configuration.
*/
public interface YamlRuleConfiguration extends YamlConfiguration {
/**
* Get rule configuration type.
*
* @return rule configuration type
*/
Class<? extends RuleConfiguration> getRuleConfigurationType();
}
This interface really doesn't have a single argument constructor
Get the interface YamlRuleConfiguration constructor to return an empty array and error
@790477691 Can you provide a demo project?
@zhaojinchao95 Here's a test project https://github.com/790477691/shardingJdbcTest.git
@zhaojinchao95 shardingsphere jdbc + spring; Are there any examples that can be used?
@790477691
Use example-generator
to generate various example projects.
https://github.com/apache/shardingsphere/tree/master/examples/shardingsphere-example-generator
@790477691 I think it is duplicated with #23143, can you have a check?
pom
scratch.yaml
spring-datasource.xml
DynamicDataSource
DataSourceContextHolder