tree: 8b97944b1152c995aa266d29135f64b65c74adfe [path history] [tgz]
  1. src/
  2. pom.xml
  3. README.md
  4. README_ZH.md
examples/shardingsphere-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
productproductjdbc, proxy
modeoperating modecluster-zookeeper, cluster-etcd, standalone
transactiontransaction typelocal, xa-atomikos, xa-narayana
featuresfeature setsharding, readwrite-splitting, db-discovery, encrypt
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