tree: 1e2fda5b67bc17a86a29402e469176401861398b [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 freemarker 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 modememory, cluster-zookeeper, cluster-etcd, standalone-file
transactiontransaction typelocal
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