tree: 2587a5e6e2bfad2ea78fca5fb85b0be2f4d63fa3 [path history] [tgz]
  1. src/
  2. pom.xml
  3. README.md
examples/shardingsphere-jdbc-example-generator/README.md

Example codes generator of ShardingSphere

Project uses template engine to generate example codes of ShardingSphere.

Usage

  1. Configure YAML file

File: src/main/resources/config.yaml

  1. Generate code

Run org.apache.shardingsphere.example.generator.ExampleGeneratorMain to generate example codes.

Generated codes: target/generated-sources/shardingsphere-${product}-sample

Configuration Item Explanation

NameDescriptionOptions
modeoperating modecluster-zookeeper, cluster-etcd, standalone
transactiontransaction typelocal, xa-atomikos, xa-narayana
featuresfeature setsharding, readwrite-splitting, encrypt, shadow, mask
frameworksframework setjdbc, spring-boot-starter-jdbc, spring-boot-starter-jpa, spring-boot-starter-mybatis, spring-namespace-jpa, spring-namespace-mybatis
hostdatabase host
portdatabase port
usernamedatabase username
passworddatabase password