Merge pull request #1 from geomonlin/4.0.1-release

update acceptance-test to 4.0.1
diff --git a/.github/GIT_TEMPLATE/.git_commit_template.txt b/.github/GIT_TEMPLATE/.git_commit_template.txt
new file mode 100644
index 0000000..353a7bc
--- /dev/null
+++ b/.github/GIT_TEMPLATE/.git_commit_template.txt
@@ -0,0 +1,66 @@
+Add git message title here
+
+# See links to relevant web pages, issue trackers, etc.
+See: https://github.com/
+See: [Git Page](https://github.com/)
+
+# List all co-authors, so people can contact with them
+Co-authored-by: Name <name@example.com>
+
+# Why is this change happening, e.g. goals, use cases, stories, etc.?
+Why:
+
+# How is this change happening, e.g. implementations, algorithms, etc.?
+How:
+
+# Tags suitable for searching, such as hashtags, keywords, etc.
+Tags:
+
+# ## Help ##
+#
+# Subject line imperative uppercase verbs:
+#
+#   Add = Create a capability e.g. feature, test, dependency.
+#   Drop = Delete a capability e.g. feature, test, dependency.
+#   Fix = Fix an issue e.g. bug, typo, accident, misstatement.
+#   Bump = Increase the version of something e.g. a dependency.
+#   Make = Change the build process, or tools, or infrastructure.
+#   Start = Begin doing something; e.g. enable a toggle, feature flag, etc.
+#   Stop = End doing something; e.g. disable a toggle, feature flag, etc.
+#   Refactor = A change that MUST be just refactoring.
+#   Reformat = A change that MUST be just format, e.g. indent line, trim space, etc.
+#   Rephrase = A change that MUST be just textual, e.g. edit a comment, doc, etc.
+#   Optimize = A change that MUST be just about performance, e.g. speed up code.
+#   Document = A change that MUST be only in the documentation, e.g. help files.
+#
+# For the subject line:
+#   * Use 50 characters maximum.
+#   * Do not use a sentence-ending period.
+#
+# For the body text:
+#   * Use as many lines as you like.
+#   * Use 72 characters maximum per line for typical word wrap text.
+#
+#
+# ## About ##
+#
+# This is our git commit messages.
+# You can edit this template if you want
+#
+# ## Usage ##
+#
+# Put the template file here:
+#
+#     ~/.git_commit_template.txt
+#
+# Configure git to use the template file by running:
+#
+#     git config --global commit.template ~/.git_commit_template.txt
+#
+# Add the template file to the ~/.gitconfig file:
+#
+#     [commit]
+#       template = ~/.git_commit_template.txt
+#
+# you could put it in other location if you prefer
+#
diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md
new file mode 100644
index 0000000..54f2cfd
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug-report.md
@@ -0,0 +1,32 @@
+---
+name: "\U0001F41B Bug Report"
+about: Something isn't working as expected
+---
+
+## Bug Report
+
+**For English only**, other languages will not accept.
+
+Before report a bug, make sure you have:
+
+- Searched open and closed [GitHub issues](https://github.com/apache/incubator-shardingsphere-example/issues).
+- Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
+
+Please pay attention on issues you submitted, because we maybe need more details. 
+If no response **more than 7 days** and we cannot reproduce it on current information, we will **close it**.
+
+Please answer these questions before submitting your issue. Thanks!
+
+### Which version of ShardingSphere did you use?
+
+### Which project did you use? Sharding-JDBC or Sharding-Proxy?
+
+### Expected behavior
+
+### Actual behavior
+
+### Reason analyze (If you can)
+
+### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
+
+### Example codes for reproduce this issue (such as a github link).
diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md
new file mode 100644
index 0000000..293b671
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature-request.md
@@ -0,0 +1,17 @@
+---
+name: "\U0001F680 Feature Request"
+about: I have a suggestion
+---
+
+## Feature Request
+
+**For English only**, other languages will not accept.
+
+Please pay attention on issues you submitted, because we maybe need more details. 
+If no response **more than 7 days** and we cannot make decision by current information, we will **close it**.
+
+Please answer these questions before submitting your issue. Thanks!
+
+### Is your feature request related to a problem?
+
+### Describe the feature you would like.
diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md
new file mode 100644
index 0000000..1af1ceb
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/question.md
@@ -0,0 +1,17 @@
+---
+name: "\U0001F914 Question"
+about: Usage question that isn't answered in docs or discussion
+---
+
+## Question
+
+**For English only**, other languages will not accept.
+
+Before asking a question, make sure you have:
+
+- Googled your question.
+- Searched open and closed [GitHub issues](https://github.com/apache/incubator-shardingsphere-example/issues).
+- Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
+
+Please pay attention on issues you submitted, because we maybe need more details. 
+If no response **more than 7 days** and we cannot reproduce it on current information, we will **close it**.
diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE
new file mode 100644
index 0000000..4c4c082
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE
@@ -0,0 +1,6 @@
+Fixes #ISSUSE_ID.
+
+Changes proposed in this pull request:
+-
+-
+-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8494803
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,33 @@
+# maven ignore
+target/
+#*.jar
+*.war
+*.zip
+*.tar
+#*.tar.gz
+
+# eclipse ignore
+.settings/
+.project
+.classpath
+
+# idea ignore
+.idea/
+*.ipr
+*.iml
+*.iws
+
+# temp ignore
+logs/
+*.doc
+*.log
+*.cache
+*.diff
+*.patch
+*.tmp
+
+# system ignore
+.DS_Store
+Thumbs.db
+
+*.class
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8dada3e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1e2efb1
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+**Apache ShardingSphere-acceptance-test**
diff --git a/docker/Dockerfile b/docker/Dockerfile
new file mode 100644
index 0000000..6bab977
--- /dev/null
+++ b/docker/Dockerfile
@@ -0,0 +1,35 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+
+FROM java:7
+MAINTAINER ShardingSphere "dev@shardingsphere.incubator.apache.org"
+
+ENV LOCAL_PATH /sharding-proxy
+ENV HEADER_NAME apache
+
+COPY sharding-proxy-bin.tar.gz .
+COPY ./tools/wait-for-it.sh /usr/local/bin/
+COPY ./tools/docker-entrypoint.sh /usr/local/bin/
+RUN chmod 777 /usr/local/bin/wait-for-it.sh
+RUN chmod 777 /usr/local/bin/docker-entrypoint.sh
+RUN tar -xzvf sharding-proxy-bin.tar.gz
+RUN mv ${HEADER_NAME}*-bin $LOCAL_PATH
+COPY ./driver/mysql-connector-java-5.1.47.jar ${LOCAL_PATH}/lib/mysql-connector-java-5.1.47.jar
+RUN rm -f sharding-proxy-bin.tar.gz
+#/usr/local/bin/wait-for-it.sh sharding-mysql:3306 --
+ENTRYPOINT /sharding-proxy/bin/start.sh $PORT && tail -f /sharding-proxy/logs/stdout.log
diff --git a/docker/driver/mysql-connector-java-5.1.47.jar b/docker/driver/mysql-connector-java-5.1.47.jar
new file mode 100644
index 0000000..f3398ed
--- /dev/null
+++ b/docker/driver/mysql-connector-java-5.1.47.jar
Binary files differ
diff --git a/docker/script/build-images.sh b/docker/script/build-images.sh
new file mode 100644
index 0000000..65c1562
--- /dev/null
+++ b/docker/script/build-images.sh
@@ -0,0 +1,52 @@
+#!/usr/bin/env sh
+PORT_JDBC_MYSQL=3310
+PORT_JDBC_ZK=2188
+PORT_JDBC_PG=5433
+
+PORT_PROXY_MYSQL_SHARDING=3308
+PORT_PROXY_MYSQL_ORCH=3307
+PORT_PROXY_MYSQL_ZK=2185
+
+PORT_PROXY_PG_SHARDING=13308
+PORT_PROXY_PG_ORCH=13307
+PORT_PROXY_PG_ZK=12185
+
+PORT_RAW_PROXY=3307
+
+cd docker
+ip=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:" | head -1`
+sudo cp ../../$1/sharding-distribution/sharding-proxy-distribution/target/*.tar.gz  ./sharding-proxy-bin.tar.gz
+cd sharding-jdbc/jdbc
+sudo docker-compose up -d
+cd ../../
+cd sharding-proxy/proxy-mysql
+sudo docker-compose up -d
+cd ../proxy-postgresql
+sudo docker-compose up -d
+cd ../../../
+
+sudo sed -i "s/localhost/${ip}/g" `grep localhost -rl example-core/example-api/`
+sudo sed -i "s/3306/${PORT_JDBC_MYSQL}/g" `grep 3306 -rl example-core/example-api/`
+sudo sed -i "s/5432/${PORT_JDBC_PG}/g" `grep 5432 -rl example-core/example-api/`
+sudo sed -i "s/3308/${PORT_PROXY_MYSQL_SHARDING}/g" `grep 3308 -rl example-core/example-api/`
+sudo sed -i "s/3309/${PORT_PROXY_PG_SHARDING}/g" `grep 3309 -rl example-core/example-api/`
+
+sudo sed -i "s/localhost:3306/${ip}:${PORT_JDBC_MYSQL}/g" `grep localhost:3306 -rl sharding-jdbc-example/`
+sudo sed -i "s/localhost:5432/${ip}:${PORT_JDBC_PG}/g" `grep localhost:5432 -rl sharding-jdbc-example/`
+sudo sed -i "s/localhost:2181/${ip}:${PORT_JDBC_ZK}/g" `grep localhost:2181 -rl sharding-jdbc-example/`
+
+sudo sed -i "s/localhost:3307/${ip}:${PORT_PROXY_MYSQL_SHARDING}/g" `grep localhost:3307 -rl sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/`
+sudo sed -i "s/localhost:3307/${ip}:${PORT_PROXY_MYSQL_SHARDING}/g" `grep localhost:3307 -rl sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/`
+sudo sed -i "s/localhost:3307/${ip}:${PORT_PROXY_MYSQL_ORCH}/g" `grep localhost:3307 -rl sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/`
+sudo sed -i "s/localhost:3307/${ip}:${PORT_PROXY_MYSQL_ORCH}/g" `grep localhost:3307 -rl sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/`
+
+sudo sed -i "s/localhost:3307/${ip}:${PORT_PROXY_PG_SHARDING}/g" `grep localhost:3307 -rl sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/`
+sudo sed -i "s/localhost:3307/${ip}:${PORT_PROXY_PG_SHARDING}/g" `grep localhost:3307 -rl sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/`
+sudo sed -i "s/localhost:3307/${ip}:${PORT_PROXY_PG_ORCH}/g" `grep localhost:3307 -rl sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/`
+sudo sed -i "s/localhost:3307/${ip}:${PORT_PROXY_PG_ORCH}/g" `grep localhost:3307 -rl sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/`
+
+sudo chmod u+x docker/tools/wait-for-it.sh
+sudo bash docker/tools/wait-for-it.sh ${ip}:${PORT_PROXY_MYSQL_SHARDING} -- echo "sharding-proxy-mysql"
+sudo bash docker/tools/wait-for-it.sh ${ip}:${PORT_PROXY_MYSQL_ORCH} -- echo "orchestration-proxy-mysql"
+sudo bash docker/tools/wait-for-it.sh ${ip}:${PORT_PROXY_PG_SHARDING} -- echo "sharding-proxy-postgresql"
+sudo bash docker/tools/wait-for-it.sh ${ip}:${PORT_PROXY_PG_ORCH} -- echo "orchestration-proxy-postgresql"
diff --git a/docker/script/destroy-images.sh b/docker/script/destroy-images.sh
new file mode 100644
index 0000000..032cd99
--- /dev/null
+++ b/docker/script/destroy-images.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env sh
+cd docker
+sudo rm -f sharding-proxy-bin.tar.gz
+cd sharding-jdbc/jdbc
+#sudo docker-compose down --rmi all //remove all images of service
+if [[ $bool == true ]] ; then
+  sudo docker-compose down -v --rmi all
+elif [[ $bool == false || $bool == "" ]] ; then
+  sudo docker-compose down -v
+fi
+cd ../../
+cd sharding-proxy/proxy-mysql
+#sudo docker-compose down --rmi all //remove all images of service
+if [[ $bool == true ]] ; then
+  sudo docker-compose down -v --rmi all
+elif [[ $bool == false || $bool == "" ]] ; then
+  sudo docker-compose down -v
+fi
+cd ../proxy-postgresql
+if [[ $bool == true ]] ; then
+  sudo docker-compose down -v --rmi all
+elif [[ $bool == false || $bool == "" ]] ; then
+  sudo docker-compose down -v
+fi
+cd ../../../
\ No newline at end of file
diff --git a/docker/sharding-jdbc/jdbc/docker-compose.yml b/docker/sharding-jdbc/jdbc/docker-compose.yml
new file mode 100644
index 0000000..cec2816
--- /dev/null
+++ b/docker/sharding-jdbc/jdbc/docker-compose.yml
@@ -0,0 +1,45 @@
+version: '3.7'
+services:
+  jdbc-mysql:
+    ## mysql version, you could get more tags at here : https://hub.docker.com/_/mysql?tab=tags
+    image: "mysql:5.7"
+    ## default port is 3306, you could change to 33060 or any other port doesn't conflict MySQL on your OS
+    ports:
+      - "3310:3306"
+    container_name: jdbc-mysql
+    ## launch mysql without password
+    ## you could access the mysql in container by following command :
+    ## docker exec -it sharding-sphere-mysql mysql -uroot
+    environment:
+      - MYSQL_ALLOW_EMPTY_PASSWORD=yes
+    ## if you insist to use password in mysql, remove MYSQL_ALLOW_EMPTY_PASSWORD=yes and uncomment following args
+    #  - MYSQL_ROOT_PASSWORD=root
+    ulimits:
+      nofile:
+        soft: "65536"
+        hard: "65536"
+
+    volumes: 
+      - ../../../src/resources/manual_schema.sql:/docker-entrypoint-initdb.d/manual_schema.sql
+      - ./mysql-conf/my.cnf:/etc/mysql/my.cnf
+
+  jdbc-zookeeper:
+    ## get more versions of zookeeper here : https://hub.docker.com/_/zookeeper?tab=tags
+    image: "zookeeper:3.4"
+    ports: 
+     - "2188:2181"
+    container_name: sharding-jdbc-zookeeper
+
+  jdbc-postgres:
+    ## get more versions of zookeeper here : https://hub.docker.com/_/postgres?tab=tags
+    image: postgres:11
+    ports:
+      - "5433:5432"
+    container_name: jdbc-postgresql
+    environment:
+      POSTGRES_DB: shardingsphere
+      POSTGRES_USER: postgres
+      POSTGRES_PASSWORD:
+      PGDATA: /var/lib/postgresql/data/pgdata
+    volumes:
+      - ../../../src/resources/manual_schema_postgre.sql:/docker-entrypoint-initdb.d/manual_schema_postgre.sql
diff --git a/docker/sharding-jdbc/jdbc/mysql-conf/my.cnf b/docker/sharding-jdbc/jdbc/mysql-conf/my.cnf
new file mode 100644
index 0000000..bce1daa
--- /dev/null
+++ b/docker/sharding-jdbc/jdbc/mysql-conf/my.cnf
@@ -0,0 +1,4 @@
+[mysqld]
+default-storage-engine=INNODB
+max_connections=2000
+default_authentication_plugin=mysql_native_password
\ No newline at end of file
diff --git a/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-encrypt.yaml b/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-encrypt.yaml
new file mode 100644
index 0000000..d86ea20
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-encrypt.yaml
@@ -0,0 +1,95 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: encrypt_db
+#
+#dataSource:
+#  url: jdbc:postgresql://sharding-proxy-mysql:5432/demo_ds?serverTimezone=UTC&useSSL=false
+#  username: postgres
+#  password: postgres
+#  connectionTimeoutMilliseconds: 30000
+#  idleTimeoutMilliseconds: 60000
+#  maxLifetimeMilliseconds: 1800000
+#  maxPoolSize: 50
+#
+#encryptRule:
+#  encryptors:
+#    encryptor_aes:
+#      type: aes
+#      props:
+#        aes.key.value: 123456abc
+#    encryptor_md5:
+#      type: md5
+#  tables:
+#    t_encrypt:
+#      columns:
+#        user_id:
+#          plainColumn: user_plain
+#          cipherColumn: user_cipher
+#          encryptor: encryptor_aes
+#        order_id:
+#          cipherColumn: order_encrypt
+#          encryptor: encryptor_md5
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: encrypt_db
+
+dataSource:
+  url: jdbc:mysql://proxy-mysql:3306/demo_ds?serverTimezone=UTC&useSSL=false
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 50
+
+encryptRule:
+  encryptors:
+    encryptor_aes:
+      type: aes
+      props:
+        aes.key.value: 123456abc
+    encryptor_md5:
+      type: md5
+  tables:
+    t_user:
+      columns:
+        user_name:
+          plainColumn: user_name
+          cipherColumn: user_name_cipher
+          encryptor: encryptor_md5
+          
+        pwd:
+          plainColumn: pwd_plain
+          cipherColumn: pwd_cipher
+          encryptor: encryptor_md5
diff --git a/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-master-slave.yaml b/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-master-slave.yaml
new file mode 100644
index 0000000..b36eda4
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-master-slave.yaml
@@ -0,0 +1,102 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+######################################################################################################
+#
+#schemaName: master_slave_db
+#
+#dataSources:
+#  master_ds:
+#    url: jdbc:postgresql://localhost:5432/demo_master_ds?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_slave_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_slave_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#masterSlaveRule:
+#  name: ms_ds
+#  masterDataSourceName: master_ds
+#  slaveDataSourceNames:
+#    - slave_ds_0
+#    - slave_ds_1
+
+######################################################################################################
+#
+# If you want to connect to postgresql, you should manually copy postgresql driver to lib directory.
+#
+######################################################################################################
+
+schemaName: master_slave_db
+
+dataSources:
+ master_ds:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_master?useUnicode=true&characterEncoding=utf-8
+   username: root
+   password: 
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 50
+ slave_ds_0:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_slave_0?useUnicode=true&characterEncoding=utf-8
+   username: root
+   password: 
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 50
+ slave_ds_1:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_slave_1?useUnicode=true&characterEncoding=utf-8
+   username: root
+   password: 
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 50
+
+masterSlaveRule:
+  name: ds_ms
+  masterDataSourceName: master_ds
+  slaveDataSourceNames:
+    - slave_ds_0
+    - slave_ds_1
diff --git a/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-sharding-encrypt.yaml b/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-sharding-encrypt.yaml
new file mode 100644
index 0000000..7f56f3d
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-sharding-encrypt.yaml
@@ -0,0 +1,60 @@
+schemaName: sharding_encrypt
+
+dataSources:
+  ds_0:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+        
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+          
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
diff --git a/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-sharding-master-slave-encrypt.yaml b/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-sharding-master-slave-encrypt.yaml
new file mode 100644
index 0000000..e06f734
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-sharding-master-slave-encrypt.yaml
@@ -0,0 +1,135 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_encrypt_db
+
+dataSources:
+ ds_master_0:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false
+   username: root
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_0_slave_0:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false
+   username: root
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_0_slave_1:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false
+   username: root
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_1:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false
+   username: root
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_1_slave_0:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false
+   username: root
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_1_slave_1:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false
+   username: root
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+
+shardingRule:
+ tables:
+   t_user:
+     actualDataNodes: ds_${0..1}.t_user_${0..1}
+     databaseStrategy:
+       inline:
+         shardingColumn: user_id
+         algorithmExpression: ds_${user_id % 2}
+     tableStrategy:
+       inline:
+         shardingColumn: user_id
+         algorithmExpression: t_user_${user_id % 2}
+     keyGenerator:
+       type: SNOWFLAKE
+       column: user_id
+ defaultTableStrategy:
+   none:
+ defaultDatabaseStrategy:
+   none:
+     
+ masterSlaveRules:
+   ds_0:
+     masterDataSourceName: ds_master_0
+     slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+     loadBalanceAlgorithmType: ROUND_ROBIN
+   ds_1:
+     masterDataSourceName: ds_master_1
+     slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+     loadBalanceAlgorithmType: ROUND_ROBIN
+
+ encryptRule:
+   encryptors:
+     encryptor_aes:
+       type: aes
+       props:
+         aes.key.value: 123456abc
+     encryptor_md5:
+       type: md5
+   tables:
+     t_user:
+       columns:
+         user_name:
+           plainColumn: user_name
+           cipherColumn: user_name_cipher
+           encryptor: encryptor_md5
+          
+         pwd:
+           plainColumn: pwd_plain
+           cipherColumn: pwd_cipher
+           encryptor: encryptor_md5
+        
\ No newline at end of file
diff --git a/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-sharding-master-slave.yaml b/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-sharding-master-slave.yaml
new file mode 100644
index 0000000..191f172
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-sharding-master-slave.yaml
@@ -0,0 +1,132 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_db
+
+dataSources:
+  ds0:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave0:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave1:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave0:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave1:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+
+shardingRule:
+  tables:
+    t_order:
+      actualDataNodes: ms_ds${0..1}.t_order_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+    t_order_item:
+      actualDataNodes: ms_ds${0..1}.t_order_item_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+  bindingTables:
+    - t_order,t_order_item
+
+  defaultDataSourceName: ds0
+  defaultTableStrategy:
+    none:
+
+  masterSlaveRules:
+    ms_ds0:
+      masterDataSourceName: ds0
+      slaveDataSourceNames:
+        - ds0_slave0
+        - ds0_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ms_ds1:
+      masterDataSourceName: ds1
+      slaveDataSourceNames:
+        - ds1_slave0
+        - ds1_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
\ No newline at end of file
diff --git a/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-sharding.yaml b/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-sharding.yaml
new file mode 100644
index 0000000..adf9825
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-orchestration/config-sharding.yaml
@@ -0,0 +1,140 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of sharding rule.
+#   
+# If you want to use sharding, please refer to this file; 
+# if you want to use master-slave, please refer to the config-master_slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: sharding_db
+#
+#dataSources:
+#  ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#shardingRule:
+#  tables:
+#    t_order:
+#      actualDataNodes: ds_${0..1}.t_order_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_id
+#    t_order_item:
+#      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_item_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_item_id
+#  bindingTables:
+#    - t_order,t_order_item
+#  defaultDatabaseStrategy:
+#    inline:
+#      shardingColumn: user_id
+#      algorithmExpression: ds_${user_id % 2}
+#  defaultTableStrategy:
+#    none:
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSources:
+  ds_0:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+ tables:
+   t_address:
+     actualDataNodes: ds_${0..1}.t_address
+   t_order:
+     actualDataNodes: ds_${0..1}.t_order_${0..1}
+     tableStrategy:
+        inline:
+         shardingColumn: order_id
+         algorithmExpression: t_order_${order_id % 2}
+     databaseStrategy:
+        inline:
+         shardingColumn: user_id
+         algorithmExpression: ds_${user_id % 2}
+     keyGenerator:
+       type: SNOWFLAKE
+       column: order_id
+   t_order_item:
+     actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+     tableStrategy:
+       inline:
+         shardingColumn: order_id
+         algorithmExpression: t_order_item_${order_id % 2}
+     databaseStrategy:
+        inline:
+         shardingColumn: user_id
+         algorithmExpression: ds_${user_id % 2}
+     keyGenerator:
+       type: SNOWFLAKE
+       column: order_id
+ bindingTables:
+   - t_order,t_order_item
+ broadcastTables:
+    - t_address
+ defaultDatabaseStrategy:
+   none:
+ defaultTableStrategy:
+   none:
diff --git a/docker/sharding-proxy/proxy-mysql/conf-orchestration/logback.xml b/docker/sharding-proxy/proxy-mysql/conf-orchestration/logback.xml
new file mode 100644
index 0000000..9caaafb
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-orchestration/logback.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<configuration>
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <logger name="org.apache.shardingsphere" level="info" additivity="false">
+        <appender-ref ref="console"/>
+    </logger>
+    
+    <root>
+        <level value="info" />
+        <appender-ref ref="console" />
+    </root>
+</configuration> 
diff --git a/docker/sharding-proxy/proxy-mysql/conf-orchestration/server.yaml b/docker/sharding-proxy/proxy-mysql/conf-orchestration/server.yaml
new file mode 100644
index 0000000..57d1b25
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-orchestration/server.yaml
@@ -0,0 +1,61 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# If you want to configure orchestration, authorization and proxy properties, please refer to this file.
+# 
+######################################################################################################
+
+orchestration:
+ name: orchestration_ds
+ overwrite: true
+ registry:
+   type: zookeeper
+   serverLists: sharding-proxy-zookeeper-mysql:2181
+   namespace: orchestration
+
+
+# orchestration:
+#   name: nacos_orchestration
+#   overwrite: true
+#   registry:
+#     type: nacos
+#     serverLists: localhost:8848
+#     namespace:
+#     props:
+#       group: SHARDING_SPHERE_DEFAULT_GROUP
+#       timeout: 3000
+
+authentication:
+ users:
+   root:
+     password:
+
+props:
+ max.connections.size.per.query: 1
+ acceptor.size: 32  # The default value is available processors count * 2.
+ executor.size: 32  # Infinite by default.
+ proxy.frontend.flush.threshold: 128  # The default value is 128.
+   # LOCAL: Proxy will run with LOCAL transaction.
+   # XA: Proxy will run with XA transaction.
+   # BASE: Proxy will run with B.A.S.E transaction.
+ proxy.transaction.type: LOCAL
+ proxy.opentracing.enabled: false
+ #proxy.hint.enabled: true
+ query.with.cipher.column: true
+ sql.show: true
diff --git a/docker/sharding-proxy/proxy-mysql/conf-sharding/config-encrypt.yaml b/docker/sharding-proxy/proxy-mysql/conf-sharding/config-encrypt.yaml
new file mode 100644
index 0000000..d86ea20
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-sharding/config-encrypt.yaml
@@ -0,0 +1,95 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: encrypt_db
+#
+#dataSource:
+#  url: jdbc:postgresql://sharding-proxy-mysql:5432/demo_ds?serverTimezone=UTC&useSSL=false
+#  username: postgres
+#  password: postgres
+#  connectionTimeoutMilliseconds: 30000
+#  idleTimeoutMilliseconds: 60000
+#  maxLifetimeMilliseconds: 1800000
+#  maxPoolSize: 50
+#
+#encryptRule:
+#  encryptors:
+#    encryptor_aes:
+#      type: aes
+#      props:
+#        aes.key.value: 123456abc
+#    encryptor_md5:
+#      type: md5
+#  tables:
+#    t_encrypt:
+#      columns:
+#        user_id:
+#          plainColumn: user_plain
+#          cipherColumn: user_cipher
+#          encryptor: encryptor_aes
+#        order_id:
+#          cipherColumn: order_encrypt
+#          encryptor: encryptor_md5
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: encrypt_db
+
+dataSource:
+  url: jdbc:mysql://proxy-mysql:3306/demo_ds?serverTimezone=UTC&useSSL=false
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 50
+
+encryptRule:
+  encryptors:
+    encryptor_aes:
+      type: aes
+      props:
+        aes.key.value: 123456abc
+    encryptor_md5:
+      type: md5
+  tables:
+    t_user:
+      columns:
+        user_name:
+          plainColumn: user_name
+          cipherColumn: user_name_cipher
+          encryptor: encryptor_md5
+          
+        pwd:
+          plainColumn: pwd_plain
+          cipherColumn: pwd_cipher
+          encryptor: encryptor_md5
diff --git a/docker/sharding-proxy/proxy-mysql/conf-sharding/config-master-slave.yaml b/docker/sharding-proxy/proxy-mysql/conf-sharding/config-master-slave.yaml
new file mode 100644
index 0000000..b36eda4
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-sharding/config-master-slave.yaml
@@ -0,0 +1,102 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+######################################################################################################
+#
+#schemaName: master_slave_db
+#
+#dataSources:
+#  master_ds:
+#    url: jdbc:postgresql://localhost:5432/demo_master_ds?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_slave_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_slave_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#masterSlaveRule:
+#  name: ms_ds
+#  masterDataSourceName: master_ds
+#  slaveDataSourceNames:
+#    - slave_ds_0
+#    - slave_ds_1
+
+######################################################################################################
+#
+# If you want to connect to postgresql, you should manually copy postgresql driver to lib directory.
+#
+######################################################################################################
+
+schemaName: master_slave_db
+
+dataSources:
+ master_ds:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_master?useUnicode=true&characterEncoding=utf-8
+   username: root
+   password: 
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 50
+ slave_ds_0:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_slave_0?useUnicode=true&characterEncoding=utf-8
+   username: root
+   password: 
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 50
+ slave_ds_1:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_slave_1?useUnicode=true&characterEncoding=utf-8
+   username: root
+   password: 
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 50
+
+masterSlaveRule:
+  name: ds_ms
+  masterDataSourceName: master_ds
+  slaveDataSourceNames:
+    - slave_ds_0
+    - slave_ds_1
diff --git a/docker/sharding-proxy/proxy-mysql/conf-sharding/config-sharding-encrypt.yaml b/docker/sharding-proxy/proxy-mysql/conf-sharding/config-sharding-encrypt.yaml
new file mode 100644
index 0000000..7f56f3d
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-sharding/config-sharding-encrypt.yaml
@@ -0,0 +1,60 @@
+schemaName: sharding_encrypt
+
+dataSources:
+  ds_0:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+        
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+          
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
diff --git a/docker/sharding-proxy/proxy-mysql/conf-sharding/config-sharding-master-slave-encrypt.yaml b/docker/sharding-proxy/proxy-mysql/conf-sharding/config-sharding-master-slave-encrypt.yaml
new file mode 100644
index 0000000..e06f734
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-sharding/config-sharding-master-slave-encrypt.yaml
@@ -0,0 +1,135 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_encrypt_db
+
+dataSources:
+ ds_master_0:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false
+   username: root
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_0_slave_0:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false
+   username: root
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_0_slave_1:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false
+   username: root
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_1:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false
+   username: root
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_1_slave_0:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false
+   username: root
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_1_slave_1:
+   url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false
+   username: root
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+
+shardingRule:
+ tables:
+   t_user:
+     actualDataNodes: ds_${0..1}.t_user_${0..1}
+     databaseStrategy:
+       inline:
+         shardingColumn: user_id
+         algorithmExpression: ds_${user_id % 2}
+     tableStrategy:
+       inline:
+         shardingColumn: user_id
+         algorithmExpression: t_user_${user_id % 2}
+     keyGenerator:
+       type: SNOWFLAKE
+       column: user_id
+ defaultTableStrategy:
+   none:
+ defaultDatabaseStrategy:
+   none:
+     
+ masterSlaveRules:
+   ds_0:
+     masterDataSourceName: ds_master_0
+     slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+     loadBalanceAlgorithmType: ROUND_ROBIN
+   ds_1:
+     masterDataSourceName: ds_master_1
+     slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+     loadBalanceAlgorithmType: ROUND_ROBIN
+
+ encryptRule:
+   encryptors:
+     encryptor_aes:
+       type: aes
+       props:
+         aes.key.value: 123456abc
+     encryptor_md5:
+       type: md5
+   tables:
+     t_user:
+       columns:
+         user_name:
+           plainColumn: user_name
+           cipherColumn: user_name_cipher
+           encryptor: encryptor_md5
+          
+         pwd:
+           plainColumn: pwd_plain
+           cipherColumn: pwd_cipher
+           encryptor: encryptor_md5
+        
\ No newline at end of file
diff --git a/docker/sharding-proxy/proxy-mysql/conf-sharding/config-sharding-master-slave.yaml b/docker/sharding-proxy/proxy-mysql/conf-sharding/config-sharding-master-slave.yaml
new file mode 100644
index 0000000..191f172
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-sharding/config-sharding-master-slave.yaml
@@ -0,0 +1,132 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_db
+
+dataSources:
+  ds0:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave0:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave1:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave0:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave1:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+
+shardingRule:
+  tables:
+    t_order:
+      actualDataNodes: ms_ds${0..1}.t_order_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+    t_order_item:
+      actualDataNodes: ms_ds${0..1}.t_order_item_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+  bindingTables:
+    - t_order,t_order_item
+
+  defaultDataSourceName: ds0
+  defaultTableStrategy:
+    none:
+
+  masterSlaveRules:
+    ms_ds0:
+      masterDataSourceName: ds0
+      slaveDataSourceNames:
+        - ds0_slave0
+        - ds0_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ms_ds1:
+      masterDataSourceName: ds1
+      slaveDataSourceNames:
+        - ds1_slave0
+        - ds1_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
\ No newline at end of file
diff --git a/docker/sharding-proxy/proxy-mysql/conf-sharding/config-sharding.yaml b/docker/sharding-proxy/proxy-mysql/conf-sharding/config-sharding.yaml
new file mode 100644
index 0000000..adf9825
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-sharding/config-sharding.yaml
@@ -0,0 +1,140 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of sharding rule.
+#   
+# If you want to use sharding, please refer to this file; 
+# if you want to use master-slave, please refer to the config-master_slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: sharding_db
+#
+#dataSources:
+#  ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#shardingRule:
+#  tables:
+#    t_order:
+#      actualDataNodes: ds_${0..1}.t_order_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_id
+#    t_order_item:
+#      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_item_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_item_id
+#  bindingTables:
+#    - t_order,t_order_item
+#  defaultDatabaseStrategy:
+#    inline:
+#      shardingColumn: user_id
+#      algorithmExpression: ds_${user_id % 2}
+#  defaultTableStrategy:
+#    none:
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSources:
+  ds_0:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:mysql://proxy-mysql:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+ tables:
+   t_address:
+     actualDataNodes: ds_${0..1}.t_address
+   t_order:
+     actualDataNodes: ds_${0..1}.t_order_${0..1}
+     tableStrategy:
+        inline:
+         shardingColumn: order_id
+         algorithmExpression: t_order_${order_id % 2}
+     databaseStrategy:
+        inline:
+         shardingColumn: user_id
+         algorithmExpression: ds_${user_id % 2}
+     keyGenerator:
+       type: SNOWFLAKE
+       column: order_id
+   t_order_item:
+     actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+     tableStrategy:
+       inline:
+         shardingColumn: order_id
+         algorithmExpression: t_order_item_${order_id % 2}
+     databaseStrategy:
+        inline:
+         shardingColumn: user_id
+         algorithmExpression: ds_${user_id % 2}
+     keyGenerator:
+       type: SNOWFLAKE
+       column: order_id
+ bindingTables:
+   - t_order,t_order_item
+ broadcastTables:
+    - t_address
+ defaultDatabaseStrategy:
+   none:
+ defaultTableStrategy:
+   none:
diff --git a/docker/sharding-proxy/proxy-mysql/conf-sharding/logback.xml b/docker/sharding-proxy/proxy-mysql/conf-sharding/logback.xml
new file mode 100644
index 0000000..9caaafb
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-sharding/logback.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<configuration>
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <logger name="org.apache.shardingsphere" level="info" additivity="false">
+        <appender-ref ref="console"/>
+    </logger>
+    
+    <root>
+        <level value="info" />
+        <appender-ref ref="console" />
+    </root>
+</configuration> 
diff --git a/docker/sharding-proxy/proxy-mysql/conf-sharding/server.yaml b/docker/sharding-proxy/proxy-mysql/conf-sharding/server.yaml
new file mode 100644
index 0000000..a64bd52
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/conf-sharding/server.yaml
@@ -0,0 +1,61 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# If you want to configure orchestration, authorization and proxy properties, please refer to this file.
+# 
+######################################################################################################
+
+# orchestration:
+#  name: orchestration_ds
+#  overwrite: true
+#  registry:
+#    type: zookeeper
+#    serverLists: localhost:2181
+#    namespace: orchestration
+
+
+# orchestration:
+#   name: nacos_orchestration
+#   overwrite: true
+#   registry:
+#     type: nacos
+#     serverLists: localhost:8848
+#     namespace:
+#     props:
+#       group: SHARDING_SPHERE_DEFAULT_GROUP
+#       timeout: 3000
+
+authentication:
+ users:
+   root:
+     password:
+
+props:
+ max.connections.size.per.query: 1
+ acceptor.size: 32  # The default value is available processors count * 2.
+ executor.size: 32  # Infinite by default.
+ proxy.frontend.flush.threshold: 128  # The default value is 128.
+   # LOCAL: Proxy will run with LOCAL transaction.
+   # XA: Proxy will run with XA transaction.
+   # BASE: Proxy will run with B.A.S.E transaction.
+ proxy.transaction.type: LOCAL
+ proxy.opentracing.enabled: false
+ #proxy.hint.enabled: true
+ query.with.cipher.column: true
+ sql.show: true
diff --git a/docker/sharding-proxy/proxy-mysql/docker-compose.yml b/docker/sharding-proxy/proxy-mysql/docker-compose.yml
new file mode 100644
index 0000000..cf82bda
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/docker-compose.yml
@@ -0,0 +1,69 @@
+version: '3.7'
+services:
+  mysql:
+    ## mysql version, you could get more tags at here : https://hub.docker.com/_/mysql?tab=tags
+    image: "mysql:5.7"
+    ## default port is 3306, you could change to 33060 or any other port doesn't conflict MySQL on your OS
+    ports:
+      - "3309:3306"
+    container_name: proxy-mysql
+    ## launch mysql without password
+    ## you could access the mysql in container by following command :
+    ## docker exec -it sharding-sphere-mysql mysql -uroot
+    environment:
+      - MYSQL_ALLOW_EMPTY_PASSWORD=yes
+    ## if you insist to use password in mysql, remove MYSQL_ALLOW_EMPTY_PASSWORD=yes and uncomment following args
+    #  - MYSQL_ROOT_PASSWORD=root
+    ulimits:
+      nofile:
+        soft: "65536"
+        hard: "65536"
+
+    volumes: 
+      - ../../../src/resources/manual_schema.sql:/docker-entrypoint-initdb.d/manual_schema.sql
+      - ./mysql-conf/my.cnf:/etc/mysql/my.cnf
+
+  zookeeper:
+    ## get more versions of zookeeper here : https://hub.docker.com/_/zookeeper?tab=tags
+    image: "zookeeper:3.4"
+    ports: 
+     - "2185:2181"
+    container_name: sharding-proxy-zookeeper-mysql
+    
+  proxy-sharding:
+    image: "sharding-proxy:release"
+    build:
+      ## dockerfile path
+      context: ../..
+      ## dockerfile file name
+      dockerfile: Dockerfile
+      ## prots map
+    ports: 
+      - "3308:3307"
+      ## constainer name
+    container_name: sharding-proxy-mysql
+    depends_on: 
+      - mysql
+    entrypoint: ./usr/local/bin/docker-entrypoint.sh
+    volumes:
+      - ./conf-sharding:/sharding-proxy/conf
+
+  proxy-orchestration:
+    image: "sharding-proxy:release"
+    build:
+      ## dockerfile path
+      context: ../..
+      ## dockerfile file name
+      dockerfile: Dockerfile
+      ## prots map
+    ports:
+      - "3307:3307"
+      ## constainer name
+    container_name: orchestration-proxy-mysql
+    depends_on:
+      - mysql
+
+    entrypoint: ./usr/local/bin/docker-entrypoint.sh
+
+    volumes:
+      - ./conf-orchestration:/sharding-proxy/conf
diff --git a/docker/sharding-proxy/proxy-mysql/mysql-conf/my.cnf b/docker/sharding-proxy/proxy-mysql/mysql-conf/my.cnf
new file mode 100644
index 0000000..bce1daa
--- /dev/null
+++ b/docker/sharding-proxy/proxy-mysql/mysql-conf/my.cnf
@@ -0,0 +1,4 @@
+[mysqld]
+default-storage-engine=INNODB
+max_connections=2000
+default_authentication_plugin=mysql_native_password
\ No newline at end of file
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-encrypt.yaml b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-encrypt.yaml
new file mode 100644
index 0000000..d302098
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-encrypt.yaml
@@ -0,0 +1,95 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: encrypt_db
+#
+#dataSource:
+#  url: jdbc:postgresql://sharding-proxy-mysql:5432/demo_ds?serverTimezone=UTC&useSSL=false
+#  username: postgres
+#  password: postgres
+#  connectionTimeoutMilliseconds: 30000
+#  idleTimeoutMilliseconds: 60000
+#  maxLifetimeMilliseconds: 1800000
+#  maxPoolSize: 50
+#
+#encryptRule:
+#  encryptors:
+#    encryptor_aes:
+#      type: aes
+#      props:
+#        aes.key.value: 123456abc
+#    encryptor_md5:
+#      type: md5
+#  tables:
+#    t_encrypt:
+#      columns:
+#        user_id:
+#          plainColumn: user_plain
+#          cipherColumn: user_cipher
+#          encryptor: encryptor_aes
+#        order_id:
+#          cipherColumn: order_encrypt
+#          encryptor: encryptor_md5
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: encrypt_db
+
+dataSource:
+  url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds
+  username: postgres
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 50
+
+encryptRule:
+  encryptors:
+    encryptor_aes:
+      type: aes
+      props:
+        aes.key.value: 123456abc
+    encryptor_md5:
+      type: md5
+  tables:
+    t_user:
+      columns:
+        user_name:
+          plainColumn: user_name
+          cipherColumn: user_name_cipher
+          encryptor: encryptor_md5
+          
+        pwd:
+          plainColumn: pwd_plain
+          cipherColumn: pwd_cipher
+          encryptor: encryptor_md5
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-master-slave.yaml b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-master-slave.yaml
new file mode 100644
index 0000000..8591975
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-master-slave.yaml
@@ -0,0 +1,102 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+######################################################################################################
+#
+#schemaName: master_slave_db
+#
+#dataSources:
+#  master_ds:
+#    url: jdbc:postgresql://localhost:5432/demo_master_ds?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_slave_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_slave_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#masterSlaveRule:
+#  name: ms_ds
+#  masterDataSourceName: master_ds
+#  slaveDataSourceNames:
+#    - slave_ds_0
+#    - slave_ds_1
+
+######################################################################################################
+#
+# If you want to connect to postgresql, you should manually copy postgresql driver to lib directory.
+#
+######################################################################################################
+
+schemaName: master_slave_db
+
+dataSources:
+ master_ds:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master
+   username: postgres
+   password: 
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 50
+ slave_ds_0:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_slave_0
+   username: postgres
+   password: 
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 50
+ slave_ds_1:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_slave_1
+   username: postgres
+   password: 
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 50
+
+masterSlaveRule:
+  name: ds_ms
+  masterDataSourceName: master_ds
+  slaveDataSourceNames:
+    - slave_ds_0
+    - slave_ds_1
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-sharding-encrypt.yaml b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-sharding-encrypt.yaml
new file mode 100644
index 0000000..7783ff0
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-sharding-encrypt.yaml
@@ -0,0 +1,60 @@
+schemaName: sharding_encrypt
+
+dataSources:
+  ds_0:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_0
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_1
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+        
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+          
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-sharding-master-slave-encrypt.yaml b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-sharding-master-slave-encrypt.yaml
new file mode 100644
index 0000000..f06eaf1
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-sharding-master-slave-encrypt.yaml
@@ -0,0 +1,135 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_encrypt_db
+
+dataSources:
+ ds_master_0:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_0
+   username: postgres
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_0_slave_0:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0
+   username: postgres
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_0_slave_1:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1
+   username: postgres
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_1:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_1
+   username: postgres
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_1_slave_0:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0
+   username: postgres
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_1_slave_1:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1
+   username: postgres
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+
+shardingRule:
+ tables:
+   t_user:
+     actualDataNodes: ds_${0..1}.t_user_${0..1}
+     databaseStrategy:
+       inline:
+         shardingColumn: user_id
+         algorithmExpression: ds_${user_id % 2}
+     tableStrategy:
+       inline:
+         shardingColumn: user_id
+         algorithmExpression: t_user_${user_id % 2}
+     keyGenerator:
+       type: SNOWFLAKE
+       column: user_id
+ defaultTableStrategy:
+   none:
+ defaultDatabaseStrategy:
+   none:
+     
+ masterSlaveRules:
+   ds_0:
+     masterDataSourceName: ds_master_0
+     slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+     loadBalanceAlgorithmType: ROUND_ROBIN
+   ds_1:
+     masterDataSourceName: ds_master_1
+     slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+     loadBalanceAlgorithmType: ROUND_ROBIN
+
+ encryptRule:
+   encryptors:
+     encryptor_aes:
+       type: aes
+       props:
+         aes.key.value: 123456abc
+     encryptor_md5:
+       type: md5
+   tables:
+     t_user:
+       columns:
+         user_name:
+           plainColumn: user_name
+           cipherColumn: user_name_cipher
+           encryptor: encryptor_md5
+          
+         pwd:
+           plainColumn: pwd_plain
+           cipherColumn: pwd_cipher
+           encryptor: encryptor_md5
+        
\ No newline at end of file
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-sharding-master-slave.yaml b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-sharding-master-slave.yaml
new file mode 100644
index 0000000..39c39be
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-sharding-master-slave.yaml
@@ -0,0 +1,132 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_db
+
+dataSources:
+  ds0:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_0
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave0:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave1:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_1
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave0:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave1:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+
+shardingRule:
+  tables:
+    t_order:
+      actualDataNodes: ms_ds${0..1}.t_order_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+    t_order_item:
+      actualDataNodes: ms_ds${0..1}.t_order_item_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+  bindingTables:
+    - t_order,t_order_item
+
+  defaultDataSourceName: ds0
+  defaultTableStrategy:
+    none:
+
+  masterSlaveRules:
+    ms_ds0:
+      masterDataSourceName: ds0
+      slaveDataSourceNames:
+        - ds0_slave0
+        - ds0_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ms_ds1:
+      masterDataSourceName: ds1
+      slaveDataSourceNames:
+        - ds1_slave0
+        - ds1_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
\ No newline at end of file
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-sharding.yaml b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-sharding.yaml
new file mode 100644
index 0000000..d943eb1
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/config-sharding.yaml
@@ -0,0 +1,140 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of sharding rule.
+#   
+# If you want to use sharding, please refer to this file; 
+# if you want to use master-slave, please refer to the config-master_slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: sharding_db
+#
+#dataSources:
+#  ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#shardingRule:
+#  tables:
+#    t_order:
+#      actualDataNodes: ds_${0..1}.t_order_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_id
+#    t_order_item:
+#      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_item_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_item_id
+#  bindingTables:
+#    - t_order,t_order_item
+#  defaultDatabaseStrategy:
+#    inline:
+#      shardingColumn: user_id
+#      algorithmExpression: ds_${user_id % 2}
+#  defaultTableStrategy:
+#    none:
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSources:
+  ds_0:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_0
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_1
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+ tables:
+   t_address:
+     actualDataNodes: ds_${0..1}.t_address
+   t_order:
+     actualDataNodes: ds_${0..1}.t_order_${0..1}
+     tableStrategy:
+        inline:
+         shardingColumn: order_id
+         algorithmExpression: t_order_${order_id % 2}
+     databaseStrategy:
+        inline:
+         shardingColumn: user_id
+         algorithmExpression: ds_${user_id % 2}
+     keyGenerator:
+       type: SNOWFLAKE
+       column: order_id
+   t_order_item:
+     actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+     tableStrategy:
+       inline:
+         shardingColumn: order_id
+         algorithmExpression: t_order_item_${order_id % 2}
+     databaseStrategy:
+        inline:
+         shardingColumn: user_id
+         algorithmExpression: ds_${user_id % 2}
+     keyGenerator:
+       type: SNOWFLAKE
+       column: order_id
+ bindingTables:
+   - t_order,t_order_item
+ broadcastTables:
+    - t_address
+ defaultDatabaseStrategy:
+   none:
+ defaultTableStrategy:
+   none:
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-orchestration/logback.xml b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/logback.xml
new file mode 100644
index 0000000..9caaafb
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/logback.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<configuration>
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <logger name="org.apache.shardingsphere" level="info" additivity="false">
+        <appender-ref ref="console"/>
+    </logger>
+    
+    <root>
+        <level value="info" />
+        <appender-ref ref="console" />
+    </root>
+</configuration> 
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-orchestration/server.yaml b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/server.yaml
new file mode 100644
index 0000000..ed4992e
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-orchestration/server.yaml
@@ -0,0 +1,61 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# If you want to configure orchestration, authorization and proxy properties, please refer to this file.
+# 
+######################################################################################################
+
+orchestration:
+ name: orchestration_ds
+ overwrite: true
+ registry:
+   type: zookeeper
+   serverLists: sharding-proxy-zookeeper-postgresql:2181
+   namespace: orchestration
+
+
+# orchestration:
+#   name: nacos_orchestration
+#   overwrite: true
+#   registry:
+#     type: nacos
+#     serverLists: localhost:8848
+#     namespace:
+#     props:
+#       group: SHARDING_SPHERE_DEFAULT_GROUP
+#       timeout: 3000
+
+authentication:
+ users:
+   root:
+     password:
+
+props:
+ max.connections.size.per.query: 1
+ acceptor.size: 32  # The default value is available processors count * 2.
+ executor.size: 32  # Infinite by default.
+ proxy.frontend.flush.threshold: 128  # The default value is 128.
+   # LOCAL: Proxy will run with LOCAL transaction.
+   # XA: Proxy will run with XA transaction.
+   # BASE: Proxy will run with B.A.S.E transaction.
+ proxy.transaction.type: LOCAL
+ proxy.opentracing.enabled: false
+ #proxy.hint.enabled: true
+ query.with.cipher.column: true
+ sql.show: true
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-encrypt.yaml b/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-encrypt.yaml
new file mode 100644
index 0000000..d302098
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-encrypt.yaml
@@ -0,0 +1,95 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: encrypt_db
+#
+#dataSource:
+#  url: jdbc:postgresql://sharding-proxy-mysql:5432/demo_ds?serverTimezone=UTC&useSSL=false
+#  username: postgres
+#  password: postgres
+#  connectionTimeoutMilliseconds: 30000
+#  idleTimeoutMilliseconds: 60000
+#  maxLifetimeMilliseconds: 1800000
+#  maxPoolSize: 50
+#
+#encryptRule:
+#  encryptors:
+#    encryptor_aes:
+#      type: aes
+#      props:
+#        aes.key.value: 123456abc
+#    encryptor_md5:
+#      type: md5
+#  tables:
+#    t_encrypt:
+#      columns:
+#        user_id:
+#          plainColumn: user_plain
+#          cipherColumn: user_cipher
+#          encryptor: encryptor_aes
+#        order_id:
+#          cipherColumn: order_encrypt
+#          encryptor: encryptor_md5
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: encrypt_db
+
+dataSource:
+  url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds
+  username: postgres
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 50
+
+encryptRule:
+  encryptors:
+    encryptor_aes:
+      type: aes
+      props:
+        aes.key.value: 123456abc
+    encryptor_md5:
+      type: md5
+  tables:
+    t_user:
+      columns:
+        user_name:
+          plainColumn: user_name
+          cipherColumn: user_name_cipher
+          encryptor: encryptor_md5
+          
+        pwd:
+          plainColumn: pwd_plain
+          cipherColumn: pwd_cipher
+          encryptor: encryptor_md5
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-master-slave.yaml b/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-master-slave.yaml
new file mode 100644
index 0000000..8591975
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-master-slave.yaml
@@ -0,0 +1,102 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+######################################################################################################
+#
+#schemaName: master_slave_db
+#
+#dataSources:
+#  master_ds:
+#    url: jdbc:postgresql://localhost:5432/demo_master_ds?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_slave_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_slave_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#masterSlaveRule:
+#  name: ms_ds
+#  masterDataSourceName: master_ds
+#  slaveDataSourceNames:
+#    - slave_ds_0
+#    - slave_ds_1
+
+######################################################################################################
+#
+# If you want to connect to postgresql, you should manually copy postgresql driver to lib directory.
+#
+######################################################################################################
+
+schemaName: master_slave_db
+
+dataSources:
+ master_ds:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master
+   username: postgres
+   password: 
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 50
+ slave_ds_0:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_slave_0
+   username: postgres
+   password: 
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 50
+ slave_ds_1:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_slave_1
+   username: postgres
+   password: 
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 50
+
+masterSlaveRule:
+  name: ds_ms
+  masterDataSourceName: master_ds
+  slaveDataSourceNames:
+    - slave_ds_0
+    - slave_ds_1
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-sharding-encrypt.yaml b/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-sharding-encrypt.yaml
new file mode 100644
index 0000000..7783ff0
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-sharding-encrypt.yaml
@@ -0,0 +1,60 @@
+schemaName: sharding_encrypt
+
+dataSources:
+  ds_0:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_0
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_1
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+        
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+          
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-sharding-master-slave-encrypt.yaml b/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-sharding-master-slave-encrypt.yaml
new file mode 100644
index 0000000..f06eaf1
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-sharding-master-slave-encrypt.yaml
@@ -0,0 +1,135 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_encrypt_db
+
+dataSources:
+ ds_master_0:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_0
+   username: postgres
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_0_slave_0:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0
+   username: postgres
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_0_slave_1:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1
+   username: postgres
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_1:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_1
+   username: postgres
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_1_slave_0:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0
+   username: postgres
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+ ds_master_1_slave_1:
+   url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1
+   username: postgres
+   password:
+   connectionTimeoutMilliseconds: 30000
+   idleTimeoutMilliseconds: 60000
+   maxLifetimeMilliseconds: 1800000
+   maxPoolSize: 65
+
+shardingRule:
+ tables:
+   t_user:
+     actualDataNodes: ds_${0..1}.t_user_${0..1}
+     databaseStrategy:
+       inline:
+         shardingColumn: user_id
+         algorithmExpression: ds_${user_id % 2}
+     tableStrategy:
+       inline:
+         shardingColumn: user_id
+         algorithmExpression: t_user_${user_id % 2}
+     keyGenerator:
+       type: SNOWFLAKE
+       column: user_id
+ defaultTableStrategy:
+   none:
+ defaultDatabaseStrategy:
+   none:
+     
+ masterSlaveRules:
+   ds_0:
+     masterDataSourceName: ds_master_0
+     slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+     loadBalanceAlgorithmType: ROUND_ROBIN
+   ds_1:
+     masterDataSourceName: ds_master_1
+     slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+     loadBalanceAlgorithmType: ROUND_ROBIN
+
+ encryptRule:
+   encryptors:
+     encryptor_aes:
+       type: aes
+       props:
+         aes.key.value: 123456abc
+     encryptor_md5:
+       type: md5
+   tables:
+     t_user:
+       columns:
+         user_name:
+           plainColumn: user_name
+           cipherColumn: user_name_cipher
+           encryptor: encryptor_md5
+          
+         pwd:
+           plainColumn: pwd_plain
+           cipherColumn: pwd_cipher
+           encryptor: encryptor_md5
+        
\ No newline at end of file
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-sharding-master-slave.yaml b/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-sharding-master-slave.yaml
new file mode 100644
index 0000000..39c39be
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-sharding-master-slave.yaml
@@ -0,0 +1,132 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_db
+
+dataSources:
+  ds0:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_0
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave0:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave1:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_1
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave0:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave1:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+
+shardingRule:
+  tables:
+    t_order:
+      actualDataNodes: ms_ds${0..1}.t_order_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+    t_order_item:
+      actualDataNodes: ms_ds${0..1}.t_order_item_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+  bindingTables:
+    - t_order,t_order_item
+
+  defaultDataSourceName: ds0
+  defaultTableStrategy:
+    none:
+
+  masterSlaveRules:
+    ms_ds0:
+      masterDataSourceName: ds0
+      slaveDataSourceNames:
+        - ds0_slave0
+        - ds0_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ms_ds1:
+      masterDataSourceName: ds1
+      slaveDataSourceNames:
+        - ds1_slave0
+        - ds1_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
\ No newline at end of file
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-sharding.yaml b/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-sharding.yaml
new file mode 100644
index 0000000..d943eb1
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-sharding/config-sharding.yaml
@@ -0,0 +1,140 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of sharding rule.
+#   
+# If you want to use sharding, please refer to this file; 
+# if you want to use master-slave, please refer to the config-master_slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: sharding_db
+#
+#dataSources:
+#  ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#shardingRule:
+#  tables:
+#    t_order:
+#      actualDataNodes: ds_${0..1}.t_order_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_id
+#    t_order_item:
+#      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_item_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_item_id
+#  bindingTables:
+#    - t_order,t_order_item
+#  defaultDatabaseStrategy:
+#    inline:
+#      shardingColumn: user_id
+#      algorithmExpression: ds_${user_id % 2}
+#  defaultTableStrategy:
+#    none:
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSources:
+  ds_0:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_0
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:postgresql://proxy-postgresql:5432/shardingsphere?currentSchema=demo_ds_1
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+ tables:
+   t_address:
+     actualDataNodes: ds_${0..1}.t_address
+   t_order:
+     actualDataNodes: ds_${0..1}.t_order_${0..1}
+     tableStrategy:
+        inline:
+         shardingColumn: order_id
+         algorithmExpression: t_order_${order_id % 2}
+     databaseStrategy:
+        inline:
+         shardingColumn: user_id
+         algorithmExpression: ds_${user_id % 2}
+     keyGenerator:
+       type: SNOWFLAKE
+       column: order_id
+   t_order_item:
+     actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+     tableStrategy:
+       inline:
+         shardingColumn: order_id
+         algorithmExpression: t_order_item_${order_id % 2}
+     databaseStrategy:
+        inline:
+         shardingColumn: user_id
+         algorithmExpression: ds_${user_id % 2}
+     keyGenerator:
+       type: SNOWFLAKE
+       column: order_id
+ bindingTables:
+   - t_order,t_order_item
+ broadcastTables:
+    - t_address
+ defaultDatabaseStrategy:
+   none:
+ defaultTableStrategy:
+   none:
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-sharding/logback.xml b/docker/sharding-proxy/proxy-postgresql/conf-sharding/logback.xml
new file mode 100644
index 0000000..9caaafb
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-sharding/logback.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<configuration>
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <logger name="org.apache.shardingsphere" level="info" additivity="false">
+        <appender-ref ref="console"/>
+    </logger>
+    
+    <root>
+        <level value="info" />
+        <appender-ref ref="console" />
+    </root>
+</configuration> 
diff --git a/docker/sharding-proxy/proxy-postgresql/conf-sharding/server.yaml b/docker/sharding-proxy/proxy-postgresql/conf-sharding/server.yaml
new file mode 100644
index 0000000..a64bd52
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/conf-sharding/server.yaml
@@ -0,0 +1,61 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# If you want to configure orchestration, authorization and proxy properties, please refer to this file.
+# 
+######################################################################################################
+
+# orchestration:
+#  name: orchestration_ds
+#  overwrite: true
+#  registry:
+#    type: zookeeper
+#    serverLists: localhost:2181
+#    namespace: orchestration
+
+
+# orchestration:
+#   name: nacos_orchestration
+#   overwrite: true
+#   registry:
+#     type: nacos
+#     serverLists: localhost:8848
+#     namespace:
+#     props:
+#       group: SHARDING_SPHERE_DEFAULT_GROUP
+#       timeout: 3000
+
+authentication:
+ users:
+   root:
+     password:
+
+props:
+ max.connections.size.per.query: 1
+ acceptor.size: 32  # The default value is available processors count * 2.
+ executor.size: 32  # Infinite by default.
+ proxy.frontend.flush.threshold: 128  # The default value is 128.
+   # LOCAL: Proxy will run with LOCAL transaction.
+   # XA: Proxy will run with XA transaction.
+   # BASE: Proxy will run with B.A.S.E transaction.
+ proxy.transaction.type: LOCAL
+ proxy.opentracing.enabled: false
+ #proxy.hint.enabled: true
+ query.with.cipher.column: true
+ sql.show: true
diff --git a/docker/sharding-proxy/proxy-postgresql/docker-compose.yml b/docker/sharding-proxy/proxy-postgresql/docker-compose.yml
new file mode 100644
index 0000000..55c9998
--- /dev/null
+++ b/docker/sharding-proxy/proxy-postgresql/docker-compose.yml
@@ -0,0 +1,61 @@
+version: '3.7'
+services:
+  postgresql:
+    image: postgres:11
+    ports:
+      - "15432:5432"
+    container_name: proxy-postgresql
+    environment:
+      POSTGRES_DB: shardingsphere
+      POSTGRES_USER: postgres
+      POSTGRES_PASSWORD:
+      PGDATA: /var/lib/postgresql/data/pgdata
+    #      Resolving privileged
+    #      privileged: true
+    volumes:
+      - ../../../src/resources/manual_schema_postgre.sql:/docker-entrypoint-initdb.d/manual_schema_postgre.sql
+
+  zookeeper:
+    ## get more versions of zookeeper here : https://hub.docker.com/_/zookeeper?tab=tags
+    image: "zookeeper:3.4"
+    ports: 
+     - "12185:2181"
+    container_name: sharding-proxy-zookeeper-postgresql
+    
+  proxy-sharding:
+    image: "sharding-proxy:release"
+    build:
+      ## dockerfile path
+      context: ../..
+      ## dockerfile file name
+      dockerfile: Dockerfile
+      ## prots map
+    ports: 
+      - "13308:3307"
+      ## constainer name
+    container_name: sharding-proxy-postgresql
+    depends_on: 
+      - postgresql
+    entrypoint: ./usr/local/bin/docker-entrypoint.sh
+    volumes:
+      - ./conf-sharding:/sharding-proxy/conf
+
+  proxy-orchestration:
+    image: "sharding-proxy:release"
+    build:
+      ## dockerfile path
+      context: ../..
+      ## dockerfile file name
+      dockerfile: Dockerfile
+      ## prots map
+    ports:
+      - "13307:3307"
+      ## constainer name
+    container_name: orchestration-proxy-postgresql
+    depends_on:
+      - postgresql
+
+    entrypoint: ./usr/local/bin/docker-entrypoint.sh
+
+    volumes:
+      - ./conf-orchestration:/sharding-proxy/conf
diff --git a/docker/tools/docker-entrypoint.sh b/docker/tools/docker-entrypoint.sh
new file mode 100644
index 0000000..abfa118
--- /dev/null
+++ b/docker/tools/docker-entrypoint.sh
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+bash /usr/local/bin/wait-for-it.sh sharding-proxy-mysql:3306 -- sh /sharding-proxy/bin/start.sh 3307 && tail -f /sharding-proxy/logs/stdout.log
\ No newline at end of file
diff --git a/docker/tools/wait-for-it.sh b/docker/tools/wait-for-it.sh
new file mode 100644
index 0000000..df72be1
--- /dev/null
+++ b/docker/tools/wait-for-it.sh
@@ -0,0 +1,161 @@
+#!/usr/bin/env bash
+#   Use this script to test if a given TCP host/port are available
+
+cmdname=$(basename $0)
+
+echoerr() { if [[ $QUIET -ne 1 ]]; then echo "$@" 1>&2; fi }
+
+usage()
+{
+    cat << USAGE >&2
+Usage:
+    $cmdname host:port [-s] [-t timeout] [-- command args]
+    -h HOST | --host=HOST       Host or IP under test
+    -p PORT | --port=PORT       TCP port under test
+                                Alternatively, you specify the host and port as host:port
+    -s | --strict               Only execute subcommand if the test succeeds
+    -q | --quiet                Don't output any status messages
+    -t TIMEOUT | --timeout=TIMEOUT
+                                Timeout in seconds, zero for no timeout
+    -- COMMAND ARGS             Execute command with args after the test finishes
+USAGE
+    exit 1
+}
+
+wait_for()
+{
+    if [[ $TIMEOUT -gt 0 ]]; then
+        echoerr "$cmdname: waiting $TIMEOUT seconds for $HOST:$PORT"
+    else
+        echoerr "$cmdname: waiting for $HOST:$PORT without a timeout"
+    fi
+    start_ts=$(date +%s)
+    while :
+    do
+        (echo > /dev/tcp/$HOST/$PORT) >/dev/null 2>&1
+        result=$?
+        if [[ $result -eq 0 ]]; then
+            end_ts=$(date +%s)
+            echoerr "$cmdname: $HOST:$PORT is available after $((end_ts - start_ts)) seconds"
+            break
+        fi
+        sleep 1
+    done
+    return $result
+}
+
+wait_for_wrapper()
+{
+    # In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692
+    if [[ $QUIET -eq 1 ]]; then
+        timeout $TIMEOUT $0 --quiet --child --host=$HOST --port=$PORT --timeout=$TIMEOUT &
+    else
+        timeout $TIMEOUT $0 --child --host=$HOST --port=$PORT --timeout=$TIMEOUT &
+    fi
+    PID=$!
+    trap "kill -INT -$PID" INT
+    wait $PID
+    RESULT=$?
+    if [[ $RESULT -ne 0 ]]; then
+        echoerr "$cmdname: timeout occurred after waiting $TIMEOUT seconds for $HOST:$PORT"
+    fi
+    return $RESULT
+}
+
+# process arguments
+while [[ $# -gt 0 ]]
+do
+    case "$1" in
+        *:* )
+        hostport=(${1//:/ })
+        HOST=${hostport[0]}
+        PORT=${hostport[1]}
+        shift 1
+        ;;
+        --child)
+        CHILD=1
+        shift 1
+        ;;
+        -q | --quiet)
+        QUIET=1
+        shift 1
+        ;;
+        -s | --strict)
+        STRICT=1
+        shift 1
+        ;;
+        -h)
+        HOST="$2"
+        if [[ $HOST == "" ]]; then break; fi
+        shift 2
+        ;;
+        --host=*)
+        HOST="${1#*=}"
+        shift 1
+        ;;
+        -p)
+        PORT="$2"
+        if [[ $PORT == "" ]]; then break; fi
+        shift 2
+        ;;
+        --port=*)
+        PORT="${1#*=}"
+        shift 1
+        ;;
+        -t)
+        TIMEOUT="$2"
+        if [[ $TIMEOUT == "" ]]; then break; fi
+        shift 2
+        ;;
+        --timeout=*)
+        TIMEOUT="${1#*=}"
+        shift 1
+        ;;
+        --)
+        shift
+        CLI="$@"
+        break
+        ;;
+        --help)
+        usage
+        ;;
+        *)
+        echoerr "Unknown argument: $1"
+        usage
+        ;;
+    esac
+done
+
+if [[ "$HOST" == "" || "$PORT" == "" ]]; then
+    echoerr "Error: you need to provide a host and port to test."
+    usage
+fi
+
+TIMEOUT=${TIMEOUT:-40}
+STRICT=${STRICT:-0}
+CHILD=${CHILD:-0}
+QUIET=${QUIET:-0}
+
+if [[ $CHILD -gt 0 ]]; then
+    wait_for
+    RESULT=$?
+    exit $RESULT
+else
+    if [[ $TIMEOUT -gt 0 ]]; then
+        wait_for_wrapper
+        RESULT=$?
+    else
+        wait_for
+        RESULT=$?
+    fi
+fi
+
+if [[ $CLI != "" ]]; then
+    if [[ $RESULT -ne 0 && $STRICT -eq 1 ]]; then
+        echoerr "$cmdname: strict mode, refusing to execute subprocess"
+        exit $RESULT
+    fi
+    exec $CLI
+else
+    exit $RESULT
+fi
\ No newline at end of file
diff --git a/example-core/config-utility/pom.xml b/example-core/config-utility/pom.xml
new file mode 100644
index 0000000..421f1d6
--- /dev/null
+++ b/example-core/config-utility/pom.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>example-core</artifactId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    
+    <artifactId>config-utility</artifactId>
+    <name>common::config-utility</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-core-api</artifactId>
+            <version>${shardingsphere.version}</version>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/PreciseModuloShardingDatabaseAlgorithm.java b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/PreciseModuloShardingDatabaseAlgorithm.java
new file mode 100644
index 0000000..dff5413
--- /dev/null
+++ b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/PreciseModuloShardingDatabaseAlgorithm.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.algorithm;
+
+import org.apache.shardingsphere.api.sharding.standard.PreciseShardingAlgorithm;
+import org.apache.shardingsphere.api.sharding.standard.PreciseShardingValue;
+
+import java.util.Collection;
+
+public final class PreciseModuloShardingDatabaseAlgorithm implements PreciseShardingAlgorithm<Integer> {
+    
+    @Override
+    public String doSharding(final Collection<String> databaseNames, final PreciseShardingValue<Integer> shardingValue) {
+        for (String each : databaseNames) {
+            if (each.endsWith(shardingValue.getValue() % 2 + "")) {
+                return each;
+            }
+        }
+        throw new UnsupportedOperationException();
+    }
+}
diff --git a/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/PreciseModuloShardingTableAlgorithm.java b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/PreciseModuloShardingTableAlgorithm.java
new file mode 100644
index 0000000..aeca1bd
--- /dev/null
+++ b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/PreciseModuloShardingTableAlgorithm.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.algorithm;
+
+import org.apache.shardingsphere.api.sharding.standard.PreciseShardingAlgorithm;
+import org.apache.shardingsphere.api.sharding.standard.PreciseShardingValue;
+
+import java.util.Collection;
+
+public final class PreciseModuloShardingTableAlgorithm implements PreciseShardingAlgorithm<Long> {
+    
+    @Override
+    public String doSharding(final Collection<String> tableNames, final PreciseShardingValue<Long> shardingValue) {
+        for (String each : tableNames) {
+            if (each.endsWith(shardingValue.getValue() % 2 + "")) {
+                return each;
+            }
+        }
+        throw new UnsupportedOperationException();
+    }
+}
diff --git a/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/RangeModuloShardingDatabaseAlgorithm.java b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/RangeModuloShardingDatabaseAlgorithm.java
new file mode 100644
index 0000000..07c6e09
--- /dev/null
+++ b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/RangeModuloShardingDatabaseAlgorithm.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.algorithm;
+
+import com.google.common.collect.Range;
+import org.apache.shardingsphere.api.sharding.standard.RangeShardingAlgorithm;
+import org.apache.shardingsphere.api.sharding.standard.RangeShardingValue;
+
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+public final class RangeModuloShardingDatabaseAlgorithm implements RangeShardingAlgorithm<Integer> {
+    
+    @Override
+    public Collection<String> doSharding(final Collection<String> databaseNames, final RangeShardingValue<Integer> shardingValueRange) {
+        Set<String> result = new LinkedHashSet<>();
+        if (Range.closed(1, 5).encloses(shardingValueRange.getValueRange())) {
+            for (String each : databaseNames) {
+                if (each.endsWith("0")) {
+                    result.add(each);
+                }
+            }
+        } else if (Range.closed(6, 10).encloses(shardingValueRange.getValueRange())) {
+            for (String each : databaseNames) {
+                if (each.endsWith("1")) {
+                    result.add(each);
+                }
+            }
+        } else if (Range.closed(1, 10).encloses(shardingValueRange.getValueRange())) {
+            result.addAll(databaseNames);
+        } else {
+            throw new UnsupportedOperationException();
+        }
+        return result;
+    }
+}
diff --git a/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/RangeModuloShardingTableAlgorithm.java b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/RangeModuloShardingTableAlgorithm.java
new file mode 100644
index 0000000..7531a03
--- /dev/null
+++ b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/RangeModuloShardingTableAlgorithm.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.algorithm;
+
+import com.google.common.collect.Range;
+import org.apache.shardingsphere.api.sharding.standard.RangeShardingAlgorithm;
+import org.apache.shardingsphere.api.sharding.standard.RangeShardingValue;
+
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+public final class RangeModuloShardingTableAlgorithm implements RangeShardingAlgorithm<Long> {
+    
+    @Override
+    public Collection<String> doSharding(final Collection<String> tableNames, final RangeShardingValue<Long> shardingValue) {
+        Set<String> result = new LinkedHashSet<>();
+        if (Range.closed(200000000000000000L, 400000000000000000L).encloses(shardingValue.getValueRange())) {
+            for (String each : tableNames) {
+                if (each.endsWith("0")) {
+                    result.add(each);
+                }
+            }
+        } else {
+            throw new UnsupportedOperationException();
+        }
+        return result;
+    }
+}
diff --git a/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/config/ExampleConfiguration.java b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/config/ExampleConfiguration.java
new file mode 100644
index 0000000..eb4ccbd
--- /dev/null
+++ b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/config/ExampleConfiguration.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.config;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public interface ExampleConfiguration {
+    public DataSource getDataSource() throws SQLException;
+}
diff --git a/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/fixture/TestQueryAssistedShardingEncryptor.java b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/fixture/TestQueryAssistedShardingEncryptor.java
new file mode 100644
index 0000000..850efa5
--- /dev/null
+++ b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/fixture/TestQueryAssistedShardingEncryptor.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.fixture;
+
+import org.apache.shardingsphere.spi.encrypt.ShardingQueryAssistedEncryptor;
+
+import java.util.Properties;
+
+public final class TestQueryAssistedShardingEncryptor implements ShardingQueryAssistedEncryptor {
+    
+    private Properties properties = new Properties();
+    
+    @Override
+    public String getType() {
+        return "assistedTest";
+    }
+    
+    @Override
+    public Properties getProperties() {
+        return properties;
+    }
+    
+    @Override
+    public void setProperties(final Properties properties) {
+        this.properties = properties;
+    }
+    
+    @Override
+    public void init() {
+    }
+    
+    @Override
+    public String encrypt(final Object plaintext) {
+        return "encryptValue";
+    }
+    
+    @Override
+    public Object decrypt(final String ciphertext) {
+        return "decryptValue";
+    }
+    
+    @Override
+    public String queryAssistedEncrypt(final String plaintext) {
+        return "assistedEncryptValue";
+    }
+}
diff --git a/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/type/RegistryCenterType.java b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/type/RegistryCenterType.java
new file mode 100644
index 0000000..e6f1ee2
--- /dev/null
+++ b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/type/RegistryCenterType.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.type;
+
+public enum RegistryCenterType {
+    
+    ZOOKEEPER, NACOS
+}
diff --git a/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/type/ShardingType.java b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/type/ShardingType.java
new file mode 100644
index 0000000..7b7c972
--- /dev/null
+++ b/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/type/ShardingType.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.type;
+
+public enum ShardingType {
+    
+    SHARDING_DATABASES,
+    
+    SHARDING_TABLES,
+    
+    SHARDING_DATABASES_AND_TABLES,
+
+    SHARDING_MASTER_SLAVE_ENCRYPT,
+    
+    MASTER_SLAVE,
+    
+    SHARDING_MASTER_SLAVE,
+
+    SHARDING_ENCRYPT,
+    
+    ENCRYPT
+}
diff --git a/example-core/config-utility/src/main/resources/META-INF/services/org.apache.shardingsphere.spi.encrypt.ShardingEncryptor b/example-core/config-utility/src/main/resources/META-INF/services/org.apache.shardingsphere.spi.encrypt.ShardingEncryptor
new file mode 100644
index 0000000..4c2353e
--- /dev/null
+++ b/example-core/config-utility/src/main/resources/META-INF/services/org.apache.shardingsphere.spi.encrypt.ShardingEncryptor
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.shardingsphere.example.fixture.TestQueryAssistedShardingEncryptor
\ No newline at end of file
diff --git a/example-core/example-api/pom.xml b/example-core/example-api/pom.xml
new file mode 100644
index 0000000..0e0b8a3
--- /dev/null
+++ b/example-core/example-api/pom.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>example-core</artifactId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <artifactId>example-api</artifactId>
+    <name>common::example-core::example-api</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-transaction-core</artifactId>
+            <version>${shardingsphere.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-tx</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-jdbc-core</artifactId>
+            <version>${shardingsphere.version}</version>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/DataSourceUtil.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/DataSourceUtil.java
new file mode 100644
index 0000000..bee8a6c
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/DataSourceUtil.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api;
+
+import com.zaxxer.hikari.HikariDataSource;
+
+import javax.sql.DataSource;
+
+public final class DataSourceUtil {
+    
+    private static final String HOST = "localhost";
+    
+    private static final int MYSQL_PORT=3306;
+    
+    private static final int PROXY_MYSQL_PORT=3308;
+    
+    private static final int PROXY_POSTGRESQL_PORT=3309;
+    
+    private static final String MYSQL_USER_NAME = "root";
+    
+    private static final String MYSQL_PASSWORD = "";
+    
+    private static final int PG_PORT = 5432;
+    
+    private static final String PG_USER_NAME = "postgres";
+    
+    private static final String PG_PASSWORD = "";
+    
+    public static DataSource createDataSource(final String dataSourceName, DatabaseType dbType) {
+        switch (dbType) {
+            case MYSQL:
+                return createMySQLDataSource(dataSourceName);
+            case POSTGRESQL:
+                return createPostgreSQLDataSource(dataSourceName);
+            case PROXY_MYSQL:
+                return createProxyMySQLDataSource(dataSourceName);
+            case PROXY_POSTGRESQL:
+                return createProxyPostgreSQLDataSource(dataSourceName);
+            default:
+                throw new UnsupportedOperationException(dbType.name());
+        }
+    }
+    
+    private static DataSource createMySQLDataSource(final String dataSourceName) {
+        HikariDataSource result = new HikariDataSource();
+        result.setDriverClassName(com.mysql.jdbc.Driver.class.getName());
+        result.setJdbcUrl(String.format("jdbc:mysql://%s:%s/%s?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8", HOST, MYSQL_PORT, dataSourceName));
+        result.setUsername(MYSQL_USER_NAME);
+        result.setPassword(MYSQL_PASSWORD);
+        return result;
+    }
+    
+    private static DataSource createPostgreSQLDataSource(final String dataSourceName) {
+        HikariDataSource result = new HikariDataSource();
+        result.setDriverClassName(org.postgresql.Driver.class.getName());
+        result.setJdbcUrl(String.format("jdbc:postgresql://%s:%s/shardingsphere?currentSchema=%s", HOST, PG_PORT, dataSourceName));
+        result.setUsername(PG_USER_NAME);
+        result.setPassword(PG_PASSWORD);
+        return result;
+    }
+    
+    
+    private static DataSource createProxyMySQLDataSource(String dataSourceName) {
+        HikariDataSource result = new HikariDataSource();
+        result.setDriverClassName(com.mysql.jdbc.Driver.class.getName());
+        result.setJdbcUrl(String.format("jdbc:mysql://%s:%s/%s?useServerPrepStmts=true&cachePrepStmts=true", HOST, PROXY_MYSQL_PORT, dataSourceName));
+        result.setUsername(MYSQL_USER_NAME);
+        result.setPassword(MYSQL_PASSWORD);
+        return result;
+    }
+    
+    private static DataSource createProxyPostgreSQLDataSource(String dataSourceName) {
+        HikariDataSource result = new HikariDataSource();
+        result.setDriverClassName(org.postgresql.Driver.class.getName());
+        result.setJdbcUrl(String.format("jdbc:postgresql://%s:%s/%s?useServerPrepStmts=true&cachePrepStmts=true", HOST, PROXY_POSTGRESQL_PORT, dataSourceName));
+        result.setUsername(MYSQL_USER_NAME);
+        result.setPassword(MYSQL_PASSWORD);
+        return result;
+    }
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/DatabaseType.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/DatabaseType.java
new file mode 100644
index 0000000..7072524
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/DatabaseType.java
@@ -0,0 +1,8 @@
+package org.apache.shardingsphere.example.core.api;
+
+public enum DatabaseType {
+    POSTGRESQL,
+    MYSQL,
+    PROXY_MYSQL,
+    PROXY_POSTGRESQL
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/ExampleExecuteTemplate.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/ExampleExecuteTemplate.java
new file mode 100644
index 0000000..adbe0e8
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/ExampleExecuteTemplate.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api;
+
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+
+import java.sql.SQLException;
+
+public final class ExampleExecuteTemplate {
+    
+    public static void run(final ExampleService exampleService) throws SQLException {
+        try {
+            exampleService.initEnvironment();
+            exampleService.processSuccess();
+        } finally {
+            exampleService.cleanEnvironment();
+        }
+    }
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/SceneType.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/SceneType.java
new file mode 100644
index 0000000..eb3c5d3
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/SceneType.java
@@ -0,0 +1,20 @@
+package org.apache.shardingsphere.example.core.api;
+
+/**
+ * @author wanghaitao
+ * @date 2019/12/31 16:09
+ */
+public enum SceneType {
+    SHARDING_ONLY,
+    SHARDING_ENCRYPT,
+    SHARDING_MASTER_SLAVE,
+    SHARDING_MASTER_SLAVE_ENCRYPT,
+    ENCRYPT_ONLY,
+    MASTER_SLAVE_ONLY,
+    ORCHESTRATION_SHARDING_ONLY,
+    ORCHESTRATION_SHARDING_ENCRYPT,
+    ORCHESTRATION_SHARDING_MASTER_SLAVE,
+    ORCHESTRATION_SHARDING_MASTER_SLAVE_ENCRYPT,
+    ORCHESTRATION_ENCRYPT_ONLY,
+    ORCHESTRATION_MASTER_SLAVE_ONLY
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/Address.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/Address.java
new file mode 100644
index 0000000..96c6bd2
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/Address.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.entity;
+
+public class Address {
+    
+    private static final long serialVersionUID = 661434701950670670L;
+    
+    private Long addressId;
+    
+    private String addressName;
+    
+    public Long getAddressId() {
+        return addressId;
+    }
+    
+    public void setAddressId(final Long addressId) {
+        this.addressId = addressId;
+    }
+    
+    public String getAddressName() {
+        return addressName;
+    }
+    
+    public void setAddressName(final String addressName) {
+        this.addressName = addressName;
+    }
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/Order.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/Order.java
new file mode 100644
index 0000000..f171ca3
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/Order.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.entity;
+
+import java.io.Serializable;
+
+public class Order implements Serializable {
+    
+    private static final long serialVersionUID = 661434701950670670L;
+    
+    private long orderId;
+    
+    private int userId;
+    
+    private long addressId;
+    
+    private String status;
+    
+    public long getOrderId() {
+        return orderId;
+    }
+    
+    public void setOrderId(final long orderId) {
+        this.orderId = orderId;
+    }
+    
+    public int getUserId() {
+        return userId;
+    }
+    
+    public void setUserId(final int userId) {
+        this.userId = userId;
+    }
+    
+    public String getStatus() {
+        return status;
+    }
+    
+    public void setStatus(final String status) {
+        this.status = status;
+    }
+    
+    public long getAddressId() {
+        return addressId;
+    }
+    
+    public void setAddressId(final long addressId) {
+        this.addressId = addressId;
+    }
+    
+    @Override
+    public String toString() {
+        return String.format("order_id: %s, user_id: %s, address_id: %s, status: %s", orderId, userId, addressId, status);
+    }
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/OrderItem.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/OrderItem.java
new file mode 100644
index 0000000..ea21cfc
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/OrderItem.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.entity;
+
+import java.io.Serializable;
+
+public class OrderItem implements Serializable {
+    
+    private static final long serialVersionUID = 263434701950670170L;
+    
+    private long orderItemId;
+    
+    private long orderId;
+    
+    private int userId;
+    
+    private String status;
+    
+    public long getOrderItemId() {
+        return orderItemId;
+    }
+    
+    public void setOrderItemId(final long orderItemId) {
+        this.orderItemId = orderItemId;
+    }
+    
+    public long getOrderId() {
+        return orderId;
+    }
+    
+    public void setOrderId(final long orderId) {
+        this.orderId = orderId;
+    }
+    
+    public int getUserId() {
+        return userId;
+    }
+    
+    public void setUserId(final int userId) {
+        this.userId = userId;
+    }
+    
+    public String getStatus() {
+        return status;
+    }
+    
+    public void setStatus(final String status) {
+        this.status = status;
+    }
+    
+    @Override
+    public String toString() {
+        return String.format("order_item_id:%s, order_id: %s, user_id: %s, status: %s", orderItemId, orderId, userId, status);
+    }
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/User.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/User.java
new file mode 100644
index 0000000..136abe1
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/User.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.entity;
+
+import java.io.Serializable;
+
+public class User implements Serializable {
+    
+    private static final long serialVersionUID = 263434701950670170L;
+    
+    private int userId;
+    
+    private String userName;
+    
+    private String userNameCipher;
+    
+    private String pwd;
+
+    private String pwdPlain;
+
+    private String pwdCipher;
+
+    public int getUserId() {
+        return userId;
+    }
+
+    public void setUserId(int userId) {
+        this.userId = userId;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getUserNameCipher() {
+        return userNameCipher;
+    }
+
+    public void setUserNameCipher(String userNameCipher) {
+        this.userNameCipher = userNameCipher;
+    }
+
+    public String getPwd() {
+        return pwd;
+    }
+
+    public void setPwd(String pwd) {
+        this.pwd = pwd;
+    }
+
+    public String getPwdPlain() {
+        return pwdPlain;
+    }
+
+    public void setPwdPlain(String pwdPlain) {
+        this.pwdPlain = pwdPlain;
+    }
+
+    public String getPwdCipher() {
+        return pwdCipher;
+    }
+
+    public void setPwdCipher(String pwdCipher) {
+        this.pwdCipher = pwdCipher;
+    }
+
+    @Override
+    public String toString() {
+        return String.format("user_id: %d, user_name: %s, userNameCipher: %s, pwd: %s, pwdCipher: %s", userId, userName, userNameCipher, pwd, pwdCipher);
+    }
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/AddressRepository.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/AddressRepository.java
new file mode 100644
index 0000000..2f7edcc
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/AddressRepository.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.repository;
+
+import org.apache.shardingsphere.example.core.api.entity.Address;
+
+public interface AddressRepository extends CommonRepository<Address, Long> {
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/CommonRepository.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/CommonRepository.java
new file mode 100644
index 0000000..1bb4bff
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/CommonRepository.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.repository;
+
+import java.sql.SQLException;
+import java.util.List;
+
+public interface CommonRepository<T, P> {
+    
+    /**
+     * Create table if not exist.
+     * 
+     * @throws SQLException SQL exception
+     */
+    void createTableIfNotExists() throws SQLException;
+    
+    /**
+     * Drop table.
+     * 
+     * @throws SQLException SQL exception
+     */
+    void dropTable() throws SQLException;
+    
+    /**
+     * Truncate table.
+     * 
+     * @throws SQLException SQL exception
+     */
+    void truncateTable() throws SQLException;
+    
+    /**
+     * insert data.
+     * 
+     * @param entity entity
+     * @return generated primary key
+     * @throws SQLException SQL exception
+     */
+    P insert(T entity) throws SQLException;
+    
+    /**
+     * Delete data.
+     * 
+     * @param primaryKey primaryKey
+     * @throws SQLException SQL exception
+     */
+    void delete(P primaryKey) throws SQLException;
+    
+    /**
+     * Select all data.
+     * 
+     * @return all data
+     * @throws SQLException SQL exception
+     */
+    List<T> selectAll() throws SQLException;
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/OrderItemRepository.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/OrderItemRepository.java
new file mode 100644
index 0000000..f84c6ea
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/OrderItemRepository.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.repository;
+
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+
+public interface OrderItemRepository extends CommonRepository<OrderItem, Long> {
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/OrderRepository.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/OrderRepository.java
new file mode 100644
index 0000000..255cf73
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/OrderRepository.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.repository;
+
+import org.apache.shardingsphere.example.core.api.entity.Order;
+
+public interface OrderRepository extends CommonRepository<Order, Long> {
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/UserRepository.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/UserRepository.java
new file mode 100644
index 0000000..dc762f6
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/repository/UserRepository.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.repository;
+
+import org.apache.shardingsphere.example.core.api.entity.User;
+
+public interface UserRepository extends CommonRepository<User, Long> {
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/AbstractTransactionScenario.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/AbstractTransactionScenario.java
new file mode 100644
index 0000000..8d4bb72
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/AbstractTransactionScenario.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.senario;
+
+
+import org.apache.shardingsphere.example.core.api.service.TransactionService;
+
+public abstract class AbstractTransactionScenario {
+    
+    private final TransactionService transactionService;
+    
+    public AbstractTransactionScenario(final TransactionService transactionService) {
+        this.transactionService = transactionService;
+    }
+    
+    public TransactionService getTransactionService() {
+        return transactionService;
+    }
+    
+    protected final void doInTransactionWithSuccess() {
+        try {
+            transactionService.processSuccessWithLocal();
+            transactionService.processSuccessWithXA();
+            transactionService.processSuccessWithBase();
+        } catch (final Exception ignore) {
+        }
+    }
+    
+    protected final void doInTransactionWithFailure() {
+        try {
+            transactionService.processFailureWithLocal();
+        } catch (final Exception ex) {
+            printData();
+        }
+        try {
+            transactionService.processFailureWithXA();
+        } catch (final Exception ex) {
+            printData();
+        }
+        try {
+            transactionService.processFailureWithBase();
+        } catch (final Exception ex) {
+            printData();
+        }
+    }
+    
+    private void printData() {
+        try {
+            transactionService.printData();
+        } catch (final Exception ignore) {
+        }
+    }
+    
+//    protected final void processFailure(final TransactionType type) {
+//        try {
+//            switch (type) {
+//                case LOCAL:
+//                    transactionService.processFailureWithLocal();
+//                    break;
+//                case XA:
+//                    transactionService.processFailureWithXA();
+//                    break;
+//                case BASE:
+//                    transactionService.processFailureWithBase();
+//                    break;
+//                default:
+//            }
+//        } catch (Exception ex) {
+//            System.out.println(ex.getMessage());
+//            transactionService.printData();
+//        }
+//    }
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/AnnotationCommonServiceScenario.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/AnnotationCommonServiceScenario.java
new file mode 100644
index 0000000..54003d7
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/AnnotationCommonServiceScenario.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.senario;
+
+
+import org.apache.shardingsphere.example.core.api.service.CommonService;
+
+import java.sql.SQLException;
+
+public final class AnnotationCommonServiceScenario implements Scenario {
+    
+    private final CommonService commonService;
+    
+    public AnnotationCommonServiceScenario(final CommonService commonService) {
+        this.commonService = commonService;
+    }
+    
+    public CommonService getCommonService() {
+        return commonService;
+    }
+    
+    @Override
+    public void process() throws SQLException {
+        try {
+            commonService.initEnvironment();
+            commonService.processSuccess();
+            commonService.processFailure();
+        } catch (final Exception ex) {
+            System.out.println(ex.getMessage());
+            printData();
+        } finally {
+            commonService.cleanEnvironment();
+        }
+    }
+    
+    public static void process1(CommonService commonService) throws SQLException {
+        try {
+            commonService.initEnvironment();
+            commonService.processSuccess();
+            commonService.processFailure();
+        } catch (final Exception ex) {
+            System.out.println(ex.getMessage());
+//            printData();
+        } finally {
+            commonService.cleanEnvironment();
+        }
+    }
+    
+    private void printData() {
+        try {
+            commonService.printData();
+        } catch (final Exception ignore) {
+        }
+    }
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/AnnotationTractionServiceScenario.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/AnnotationTractionServiceScenario.java
new file mode 100644
index 0000000..69027ce
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/AnnotationTractionServiceScenario.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.senario;
+
+
+import org.apache.shardingsphere.example.core.api.service.TransactionService;
+
+import java.sql.SQLException;
+
+public final class AnnotationTractionServiceScenario extends AbstractTransactionScenario implements Scenario {
+    
+    public AnnotationTractionServiceScenario(final TransactionService transactionService) {
+        super(transactionService);
+    }
+    
+    @Override
+    public void process() throws SQLException {
+        try {
+            getTransactionService().initEnvironment();
+            doInTransactionWithSuccess();
+            doInTransactionWithFailure();
+        } finally {
+            getTransactionService().cleanEnvironment();
+        }
+    }
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/CommonServiceScenario.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/CommonServiceScenario.java
new file mode 100644
index 0000000..c6daf7f
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/CommonServiceScenario.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.senario;
+
+
+import org.apache.shardingsphere.example.core.api.service.CommonService;
+
+import java.sql.SQLException;
+
+public final class CommonServiceScenario implements Scenario {
+
+//    private final DataSource dataSource;
+    
+    private final CommonService commonService;
+    
+    public CommonServiceScenario(final CommonService commonService) {
+//        this.dataSource = dataSource;
+        this.commonService = commonService;
+    }
+    
+    public CommonService getCommonService() {
+        return commonService;
+    }
+    
+    @Override
+    public void process() throws SQLException {
+        try {
+            commonService.initEnvironment();
+            commonService.processSuccess();
+        } finally {
+            commonService.cleanEnvironment();
+        }
+    }
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/JPACommonServiceScenario.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/JPACommonServiceScenario.java
new file mode 100644
index 0000000..76760ad
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/JPACommonServiceScenario.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.senario;
+
+
+import org.apache.shardingsphere.example.core.api.service.CommonService;
+
+public final class JPACommonServiceScenario implements Scenario {
+    
+    private final CommonService commonService;
+    
+    public JPACommonServiceScenario(final CommonService commonService) {
+        this.commonService = commonService;
+    }
+    
+    public CommonService getCommonService() {
+        return commonService;
+    }
+    
+    @Override
+    public void process() {
+        processSuccess();
+        processFailure();
+    }
+    
+    private void processSuccess() {
+        try {
+            commonService.processSuccess();
+        } catch (final Exception ignore) {
+        }
+    }
+    
+    private void processFailure() {
+        try {
+            commonService.processFailure();
+        } catch (final Exception ex) {
+            System.out.println(ex.getMessage());
+            printData();
+        }
+    }
+    
+    private void printData() {
+        try {
+            commonService.printData();
+        } catch (final Exception ignore) {
+        }
+    }
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/JPATransactionServiceScenario.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/JPATransactionServiceScenario.java
new file mode 100644
index 0000000..00a14fc
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/JPATransactionServiceScenario.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.senario;
+
+
+import org.apache.shardingsphere.example.core.api.service.TransactionService;
+
+public final class JPATransactionServiceScenario extends AbstractTransactionScenario implements Scenario {
+    
+    public JPATransactionServiceScenario(final TransactionService transactionService) {
+        super(transactionService);
+    }
+    
+    @Override
+    public void process() {
+        doInTransactionWithSuccess();
+        doInTransactionWithFailure();
+    }
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/Scenario.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/Scenario.java
new file mode 100644
index 0000000..9c89259
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/Scenario.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.senario;
+
+import java.sql.SQLException;
+
+public interface Scenario {
+    
+    void process() throws SQLException;
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/TransactionServiceScenario.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/TransactionServiceScenario.java
new file mode 100644
index 0000000..0b1892f
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/senario/TransactionServiceScenario.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.senario;
+
+
+import org.apache.shardingsphere.example.core.api.service.TransactionService;
+
+import java.sql.SQLException;
+
+public final class TransactionServiceScenario implements Scenario {
+    
+    private final TransactionService transactionService;
+    
+    public TransactionServiceScenario(final TransactionService transactionService) {
+        this.transactionService = transactionService;
+    }
+    
+    public TransactionService getTransactionService() {
+        return transactionService;
+    }
+    
+    @Override
+    public void process() throws SQLException {
+        try {
+            transactionService.initEnvironment();
+            transactionService.processSuccessWithLocal();
+            transactionService.processSuccessWithXA();
+            transactionService.processSuccessWithBase();
+            transactionService.processFailureWithLocal();
+            transactionService.processFailureWithXA();
+            transactionService.processFailureWithBase();
+        } finally {
+            transactionService.cleanEnvironment();
+        }
+    }
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/CommonService.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/CommonService.java
new file mode 100644
index 0000000..290c3e6
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/CommonService.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.service;
+
+
+import org.apache.shardingsphere.example.core.api.trace.MemoryLogService;
+
+import java.sql.SQLException;
+import java.util.List;
+
+public interface CommonService {
+    
+    /**
+     * Initialize environment.
+     *
+     * @throws SQLException SQL exception
+     */
+    void initEnvironment() throws SQLException;
+    
+    /**
+     * Clean environment.
+     *
+     * @throws SQLException SQL exception
+     */
+    void cleanEnvironment() throws SQLException;
+    
+    /**
+     * Process success.
+     *
+     * @throws SQLException SQL exception
+     */
+    void processSuccess() throws SQLException;
+    
+    /**
+     * Process failure.
+     *
+     * @throws SQLException SQL exception
+     */
+    void processFailure() throws SQLException;
+    
+    /**
+     * Print data.
+     *
+     * @throws SQLException SQL exception
+     */
+    void printData() throws SQLException;
+    
+    List<Long> insertData() throws SQLException;
+    
+    MemoryLogService getMemoryLogService();
+    
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/CommonServiceImpl.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/CommonServiceImpl.java
new file mode 100644
index 0000000..6de5529
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/CommonServiceImpl.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.service;
+
+
+import org.apache.shardingsphere.example.core.api.entity.Order;
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+import org.apache.shardingsphere.example.core.api.repository.OrderItemRepository;
+import org.apache.shardingsphere.example.core.api.repository.OrderRepository;
+import org.apache.shardingsphere.example.core.api.trace.DatabaseAccess;
+import org.apache.shardingsphere.example.core.api.trace.MemoryLogService;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+public abstract class CommonServiceImpl implements CommonService {
+    
+    private MemoryLogService memoryLogService = new MemoryLogService();
+    
+    @Override
+    public MemoryLogService getMemoryLogService() {
+        return memoryLogService;
+    }
+    
+    @Override
+    public void initEnvironment() throws SQLException {
+        getOrderRepository().createTableIfNotExists();
+        getOrderItemRepository().createTableIfNotExists();
+        getOrderRepository().truncateTable();
+        getOrderItemRepository().truncateTable();
+    }
+    
+    @Override
+    public void cleanEnvironment() throws SQLException {
+        getOrderRepository().dropTable();
+        getOrderItemRepository().dropTable();
+    }
+    
+    /**
+     * process success.
+     */
+//    @Transactional
+    @Override
+    public void processSuccess() throws SQLException {
+        System.out.println("-------------- Process Success Begin ---------------");
+        List<Long> orderIds = insertData();
+        printData();
+        deleteData(orderIds);
+        printData();
+        System.out.println("-------------- Process Success Finish --------------");
+    }
+    
+    /**
+     * process failure.
+     */
+    @Transactional
+    @Override
+    public void processFailure() throws SQLException {
+        System.out.println("-------------- Process Failure Begin ---------------");
+        insertData();
+        System.out.println("-------------- Process Failure Finish --------------");
+        throw new RuntimeException("Exception occur for transaction test.");
+    }
+    
+    @Override
+    public List<Long> insertData() throws SQLException {
+        System.out.println("---------------------------- Insert Data ----------------------------");
+        List<Long> result = new ArrayList<>(10);
+        for (int i = 1; i <= 10; i++) {
+            Order order = newOrder();
+            order.setUserId(i);
+            order.setStatus("INSERT_TEST");
+            getOrderRepository().insert(order);
+            memoryLogService.putOrderData(DatabaseAccess.INSERT, order);
+            OrderItem item = newOrderItem();
+            item.setOrderId(order.getOrderId());
+            item.setUserId(i);
+            item.setStatus("INSERT_TEST");
+            getOrderItemRepository().insert(item);
+            memoryLogService.putItemData(DatabaseAccess.INSERT, item);
+            result.add(order.getOrderId());
+        }
+        return result;
+    }
+    
+    private void deleteData(final List<Long> orderIds) throws SQLException {
+        System.out.println("---------------------------- Delete Data ----------------------------");
+        for (Long each : orderIds) {
+            getOrderRepository().delete(each);
+            getOrderItemRepository().delete(each);
+        }
+    }
+    
+    @Override
+    public void printData() throws SQLException {
+        System.out.println("---------------------------- Print Order Data -----------------------");
+        for (Order each : getOrderRepository().selectAll()) {
+            memoryLogService.putOrderData(DatabaseAccess.SELECT, each);
+            System.out.println(each);
+        }
+        System.out.println("---------------------------- Print OrderItem Data -------------------");
+        for (OrderItem each : getOrderItemRepository().selectAll()) {
+            memoryLogService.putItemData(DatabaseAccess.SELECT, each);
+            System.out.println(each);
+        }
+    }
+    
+    protected abstract OrderRepository getOrderRepository();
+    
+    protected abstract OrderItemRepository getOrderItemRepository();
+    
+    protected abstract Order newOrder();
+    
+    protected abstract OrderItem newOrderItem();
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/ExampleService.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/ExampleService.java
new file mode 100644
index 0000000..7ecfc92
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/ExampleService.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.service;
+
+import org.apache.shardingsphere.example.core.api.trace.MemoryLogService;
+
+import java.sql.SQLException;
+
+public interface ExampleService {
+    
+    /**
+     * Initialize environment.
+     * 
+     * @throws SQLException SQL exception
+     */
+    void initEnvironment() throws SQLException;
+    
+    /**
+     * Clean environment.
+     * 
+     * @throws SQLException SQL exception
+     */
+    void cleanEnvironment() throws SQLException;
+    
+    /**
+     * Process success.
+     * 
+     * @throws SQLException SQL exception
+     */
+    void processSuccess() throws SQLException;
+    
+    /**
+     * Process failure.
+     * 
+     * @throws SQLException SQL exception
+     */
+    void processFailure() throws SQLException;
+    
+    /**
+     * Print data.
+     * 
+     * @throws SQLException SQL exception
+     */
+    void printData() throws SQLException;
+
+    MemoryLogService getMemoryLogService();
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/TempPgCommonServiceImpl.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/TempPgCommonServiceImpl.java
new file mode 100644
index 0000000..897a843
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/TempPgCommonServiceImpl.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.service;
+
+
+import org.apache.shardingsphere.example.core.api.entity.Order;
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+import org.apache.shardingsphere.example.core.api.repository.OrderItemRepository;
+import org.apache.shardingsphere.example.core.api.repository.OrderRepository;
+import org.apache.shardingsphere.example.core.api.trace.DatabaseAccess;
+import org.apache.shardingsphere.example.core.api.trace.MemoryLogService;
+
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+public abstract class TempPgCommonServiceImpl implements CommonService {
+    
+    private MemoryLogService memoryLogService = new MemoryLogService();
+    
+    @Override
+    public MemoryLogService getMemoryLogService() {
+        return memoryLogService;
+    }
+    
+    @Override
+    public void initEnvironment() throws SQLException {
+        getOrderRepository().createTableIfNotExists();
+        getOrderItemRepository().createTableIfNotExists();
+        getOrderRepository().truncateTable();
+        getOrderItemRepository().truncateTable();
+    }
+    
+    @Override
+    public void cleanEnvironment() throws SQLException {
+        getOrderRepository().dropTable();
+        getOrderItemRepository().dropTable();
+    }
+    
+    /**
+     * process success.
+     */
+//    @Transactional
+    @Override
+    public void processSuccess() throws SQLException {
+        System.out.println("-------------- Process Success Begin ---------------");
+        List<Long> orderIds = insertData();
+        printData();
+//        deleteData(orderIds);
+//        printData();
+        System.out.println("-------------- Process Success Finish --------------");
+    }
+    
+    /**
+     * process failure.
+     * Could not roll back JDBC transaction for PostgreSQL
+     */
+//    @Transactional
+    @Override
+    public void processFailure() throws SQLException {
+        System.out.println("-------------- Process Failure Begin ---------------");
+        insertData();
+        System.out.println("-------------- Process Failure Finish --------------");
+        throw new RuntimeException("Exception occur for transaction test.");
+    }
+    
+    @Override
+    public List<Long> insertData() throws SQLException {
+        System.out.println("---------------------------- Insert Data ----------------------------");
+        List<Long> result = new ArrayList<>(10);
+        for (int i = 1; i <= 10; i++) {
+            Order order = newOrder();
+            order.setUserId(i);
+            order.setStatus("INSERT_TEST");
+            getOrderRepository().insert(order);
+            memoryLogService.putOrderData(DatabaseAccess.INSERT, order);
+            OrderItem item = newOrderItem();
+            item.setOrderId(order.getOrderId());
+            item.setUserId(i);
+            item.setStatus("INSERT_TEST");
+            getOrderItemRepository().insert(item);
+            memoryLogService.putItemData(DatabaseAccess.INSERT, item);
+            result.add(order.getOrderId());
+        }
+        return result;
+    }
+    
+    private void deleteData(final List<Long> orderIds) throws SQLException {
+        System.out.println("---------------------------- Delete Data ----------------------------");
+        for (Long each : orderIds) {
+            getOrderRepository().delete(each);
+            getOrderItemRepository().delete(each);
+        }
+    }
+    
+    @Override
+    public void printData() throws SQLException {
+        System.out.println("---------------------------- Print Order Data -----------------------");
+        for (Order each : getOrderRepository().selectAll()) {
+            memoryLogService.putOrderData(DatabaseAccess.SELECT, each);
+            System.out.println(each);
+        }
+        System.out.println("---------------------------- Print OrderItem Data -------------------");
+        for (OrderItem each : getOrderItemRepository().selectAll()) {
+            memoryLogService.putItemData(DatabaseAccess.SELECT, each);
+            System.out.println(each);
+        }
+    }
+    
+    protected abstract OrderRepository getOrderRepository();
+    
+    protected abstract OrderItemRepository getOrderItemRepository();
+    
+    protected abstract Order newOrder();
+    
+    protected abstract OrderItem newOrderItem();
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/TransactionService.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/TransactionService.java
new file mode 100644
index 0000000..a97326d
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/service/TransactionService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.service;
+
+public interface TransactionService extends CommonService {
+    
+    void processFailureWithLocal();
+    
+    void processFailureWithXA();
+    
+    void processFailureWithBase();
+    
+    void processSuccessWithLocal();
+    
+    void processSuccessWithXA();
+    
+    void processSuccessWithBase();
+    
+    void printTransactionType();
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/trace/AssertUtils.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/trace/AssertUtils.java
new file mode 100644
index 0000000..1bd2a5d
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/trace/AssertUtils.java
@@ -0,0 +1,4 @@
+package org.apache.shardingsphere.example.core.api.trace;
+
+public interface AssertUtils {
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/trace/DatabaseAccess.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/trace/DatabaseAccess.java
new file mode 100644
index 0000000..d8930cf
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/trace/DatabaseAccess.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.trace;
+
+public enum DatabaseAccess {
+    
+    INSERT, SELECT, DELETE
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/trace/MemoryLogService.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/trace/MemoryLogService.java
new file mode 100644
index 0000000..ba375e2
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/trace/MemoryLogService.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.trace;
+
+
+import org.apache.shardingsphere.example.core.api.entity.Order;
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+import org.apache.shardingsphere.example.core.api.entity.User;
+
+import java.util.*;
+
+public class MemoryLogService {
+    
+    private final Map<DatabaseAccess, List<Order>> orderMap = new HashMap<>();
+    
+    private final Map<DatabaseAccess, List<OrderItem>> orderItemMap = new HashMap<>();
+    
+    private final Map<DatabaseAccess, List<User>> userMap = new HashMap<>();
+    
+    public void putOrderData(final DatabaseAccess operation, final Order order) {
+        if (!orderMap.containsKey(operation) && order != null) {
+            orderMap.put(operation, new LinkedList<Order>());
+        }
+        orderMap.get(operation).add(order);
+    }
+    
+    public void putUserData(final DatabaseAccess operation, final User user) {
+        if (!userMap.containsKey(operation) && user != null) {
+            userMap.put(operation, new LinkedList<User>());
+        }
+        userMap.get(operation).add(user);
+    }
+    
+    public List<Order> getOrderData(final DatabaseAccess operation) {
+        return orderMap.containsKey(operation) ? orderMap.get(operation) : Collections.<Order>emptyList();
+    }
+    
+    public void putItemData(final DatabaseAccess operation, final OrderItem orderItem) {
+        if (!orderItemMap.containsKey(operation) && orderItem != null) {
+            orderItemMap.put(operation, new LinkedList<OrderItem>());
+        }
+        orderItemMap.get(operation).add(orderItem);
+    }
+    
+    public List<OrderItem> getOrderItemData(final DatabaseAccess operation) {
+        return orderItemMap.containsKey(operation) ? orderItemMap.get(operation) : Collections.<OrderItem>emptyList();
+    } 
+    
+    public List<User> getUserData(final DatabaseAccess operation) {
+        return userMap.containsKey(operation) ? userMap.get(operation) : Collections.<User>emptyList();
+    }
+    
+   
+}
diff --git a/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/trace/ResultAssertUtils.java b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/trace/ResultAssertUtils.java
new file mode 100644
index 0000000..97cab3d
--- /dev/null
+++ b/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/trace/ResultAssertUtils.java
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.trace;
+
+
+import org.apache.shardingsphere.example.core.api.service.CommonService;
+import org.apache.shardingsphere.example.core.api.service.CommonServiceImpl;
+import org.omg.IOP.TransactionService;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class ResultAssertUtils implements AssertUtils{
+
+    public static void assertShardingDatabaseResult(final CommonService commonService) {
+        assertShardingDatabaseResult(commonService, false);
+    }
+    
+    public static void assertShardingDatabaseResult(final CommonService commonService, final boolean isRangeSharding) {
+        MemoryLogService memoryLogService = ((CommonServiceImpl) commonService).getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+        if (isRangeSharding) {
+            assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(2));
+        } else {
+            assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(10));
+        }
+    }
+
+    public static void assertShardingTableResult(final CommonService commonService) {
+        assertShardingTableResult(commonService, false);
+    }
+    
+    public static void assertShardingTableResult(final CommonService commonService, final boolean isRangeSharding) {
+        MemoryLogService memoryLogService = ((CommonServiceImpl) commonService).getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        if (isRangeSharding) {
+            assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(5));
+        } else {
+            assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(10));
+        }
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+        if (isRangeSharding) {
+            assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(5));
+        } else {
+            assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(10));
+        }
+    }
+
+    public static void assertShardingDatabaseAndTableResult(final CommonService commonService) {
+        assertShardingDatabaseAndTableResult(commonService, false);
+    }
+
+    public static void assertShardingDatabaseAndTableResult(final CommonService commonService, final boolean isRangeSharding) {
+        MemoryLogService memoryLogService = ((CommonServiceImpl) commonService).getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        if (isRangeSharding) {
+            assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(5));
+        } else {
+            assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(10));
+        }
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+        if (isRangeSharding) {
+            assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(2));
+        } else {
+            assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(10));
+        }
+    }
+
+    public static void assertMasterSlaveResult(final CommonService commonService) {
+        MemoryLogService memoryLogService = ((CommonServiceImpl) commonService).getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(0));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(0));
+    }
+    
+    public static void assertTransactionServiceResult(final TransactionService transactionService) {
+        MemoryLogService memoryLogService = ((CommonServiceImpl) transactionService).getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(60));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(30));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(60));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(30));
+    }
+    
+    public static void assertTransactionMasterSlaveResult(final TransactionService transactionService) {
+        MemoryLogService memoryLogService = ((CommonServiceImpl) transactionService).getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(60));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(30));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(60));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(30));
+    }
+}
diff --git a/example-core/example-raw-jdbc/pom.xml b/example-core/example-raw-jdbc/pom.xml
new file mode 100644
index 0000000..f6cdaf7
--- /dev/null
+++ b/example-core/example-raw-jdbc/pom.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>example-core</artifactId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <artifactId>example-raw-jdbc</artifactId>
+    <name>common::example-raw-jdbc</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>config-utility</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/common/RawJdbcAssertUtils.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/common/RawJdbcAssertUtils.java
new file mode 100644
index 0000000..7f97610
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/common/RawJdbcAssertUtils.java
@@ -0,0 +1,63 @@
+package org.apache.shardingsphere.example.core.jdbc.common;
+
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.api.trace.AssertUtils;
+import org.apache.shardingsphere.example.core.api.trace.DatabaseAccess;
+import org.apache.shardingsphere.example.core.api.trace.MemoryLogService;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * linzesi
+ */
+public class RawJdbcAssertUtils implements AssertUtils {
+    
+    public static void assertShardingTableDatabases(ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(10));
+    }
+    
+    public static void assertMasterSlaves(ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(0));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(0));
+    }
+    
+    public static void assertShardingMasterSlaves(ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(0));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(0));
+    }
+    
+    public static void assertEncrypt(ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getUserData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getUserData(DatabaseAccess.SELECT).size(), is(10));
+    }
+    
+    public static void assertShardingEncrypt(ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getUserData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getUserData(DatabaseAccess.SELECT).size(), is(10));
+    }
+    
+    public static void assertShardingMasterSlaveEncrypt(ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getUserData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getUserData(DatabaseAccess.SELECT).size(), is(0));
+    }
+    
+    public static void assertPgTempShardingTableDatabases(ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/AddressRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/AddressRepositoryImpl.java
new file mode 100644
index 0000000..f35b7c3
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/AddressRepositoryImpl.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository;
+
+import org.apache.shardingsphere.example.core.api.entity.Address;
+import org.apache.shardingsphere.example.core.api.repository.AddressRepository;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.LinkedList;
+import java.util.List;
+
+public final class AddressRepositoryImpl implements AddressRepository {
+    
+    private final DataSource dataSource;
+    
+    public AddressRepositoryImpl(final DataSource dataSource) {
+        this.dataSource = dataSource;
+    }
+    
+    @Override
+    public void createTableIfNotExists() throws SQLException {
+        String sql = "CREATE TABLE IF NOT EXISTS t_address "
+            + "(address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id))";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void dropTable() throws SQLException {
+        String sql = "DROP TABLE t_address";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void truncateTable() throws SQLException {
+        String sql = "TRUNCATE TABLE t_address";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public Long insert(final Address entity) throws SQLException {
+        String sql = "INSERT INTO t_address (address_id, address_name) VALUES (?, ?)";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, entity.getAddressId());
+            preparedStatement.setString(2, entity.getAddressName());
+            preparedStatement.executeUpdate();
+        }
+        return entity.getAddressId();
+    }
+    
+    @Override
+    public void delete(final Long primaryKey) throws SQLException {
+        String sql = "DELETE FROM t_address WHERE address_id=?";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, primaryKey);
+            preparedStatement.executeUpdate();
+        }
+    }
+    
+    @Override
+    public List<Address> selectAll() throws SQLException {
+        String sql = "SELECT * FROM t_address";
+        return getAddress(sql);
+    }
+    
+    private List<Address> getAddress(final String sql) throws SQLException {
+        List<Address> result = new LinkedList<>();
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql);
+             ResultSet resultSet = preparedStatement.executeQuery()) {
+            while (resultSet.next()) {
+                Address address = new Address();
+                address.setAddressId(resultSet.getLong(1));
+                address.setAddressName(resultSet.getString(2));
+                result.add(address);
+            }
+        }
+        return result;
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/OrderItemRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/OrderItemRepositoryImpl.java
new file mode 100644
index 0000000..a7fa763
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/OrderItemRepositoryImpl.java
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository;
+
+import org.apache.shardingsphere.example.core.api.repository.OrderItemRepository;
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.LinkedList;
+import java.util.List;
+
+public class OrderItemRepositoryImpl implements OrderItemRepository {
+    
+    private final DataSource dataSource;
+    
+    public OrderItemRepositoryImpl(final DataSource dataSource) {
+        this.dataSource = dataSource;
+    }
+    
+    @Override
+    public void createTableIfNotExists() throws SQLException {
+        String sql = "CREATE TABLE IF NOT EXISTS t_order_item "
+            + "(order_item_id BIGINT NOT NULL AUTO_INCREMENT, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id))";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void dropTable() throws SQLException {
+        String sql = "DROP TABLE t_order_item";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void truncateTable() throws SQLException {
+        String sql = "TRUNCATE TABLE t_order_item";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public Long insert(final OrderItem orderItem) throws SQLException {
+        String sql = "INSERT INTO t_order_item (order_id, user_id, status) VALUES (?, ?, ?)";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) {
+            preparedStatement.setLong(1, orderItem.getOrderId());
+            preparedStatement.setInt(2, orderItem.getUserId());
+            preparedStatement.setString(3, orderItem.getStatus());
+            preparedStatement.executeUpdate();
+            try (ResultSet resultSet = preparedStatement.getGeneratedKeys()) {
+                if (resultSet.next()) {
+                    orderItem.setOrderItemId(resultSet.getLong(1));
+                }
+            }
+        }
+        return orderItem.getOrderItemId();
+    }
+    
+    @Override
+    public void delete(final Long orderItemId) throws SQLException {
+        String sql = "DELETE FROM t_order_item WHERE order_id=?";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, orderItemId);
+            preparedStatement.executeUpdate();
+        }
+    }
+    
+    @Override
+    public List<OrderItem> selectAll() throws SQLException {
+        // TODO Associated query with encrypt may query and decrypt failed. see https://github.com/apache/incubator-shardingsphere/issues/3352
+//        String sql = "SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id";
+        String sql = "SELECT * FROM t_order_item";
+        return getOrderItems(sql);
+    }
+    
+    protected List<OrderItem> getOrderItems(final String sql) throws SQLException {
+        List<OrderItem> result = new LinkedList<>();
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql);
+             ResultSet resultSet = preparedStatement.executeQuery()) {
+            while (resultSet.next()) {
+                OrderItem orderItem = new OrderItem();
+                orderItem.setOrderItemId(resultSet.getLong(1));
+                orderItem.setOrderId(resultSet.getLong(2));
+                orderItem.setUserId(resultSet.getInt(3));
+                orderItem.setStatus(resultSet.getString(4));
+                result.add(orderItem);
+            }
+        }
+        return result;
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/OrderRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/OrderRepositoryImpl.java
new file mode 100644
index 0000000..aa4ea52
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/OrderRepositoryImpl.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository;
+
+import org.apache.shardingsphere.example.core.api.entity.Order;
+import org.apache.shardingsphere.example.core.api.repository.OrderRepository;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.LinkedList;
+import java.util.List;
+
+public class OrderRepositoryImpl implements OrderRepository {
+    
+    private final DataSource dataSource;
+    
+    public OrderRepositoryImpl(final DataSource dataSource) {
+        this.dataSource = dataSource;
+    }
+    
+    @Override
+    public void createTableIfNotExists() throws SQLException {
+        String sql = "CREATE TABLE IF NOT EXISTS t_order (order_id BIGINT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, address_id BIGINT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id))";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void dropTable() throws SQLException {
+        String sql = "DROP TABLE t_order";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void truncateTable() throws SQLException {
+        String sql = "TRUNCATE TABLE t_order";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public Long insert(final Order order) throws SQLException {
+        String sql = "INSERT INTO t_order (user_id, address_id, status) VALUES (?, ?, ?)";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) {
+            preparedStatement.setInt(1, order.getUserId());
+            preparedStatement.setLong(2, order.getAddressId());
+            preparedStatement.setString(3, order.getStatus());
+            preparedStatement.executeUpdate();
+            try (ResultSet resultSet = preparedStatement.getGeneratedKeys()) {
+                if (resultSet.next()) {
+                    order.setOrderId(resultSet.getLong(1));
+                }
+            }
+        }
+        return order.getOrderId();
+    }
+    
+    @Override
+    public void delete(final Long orderId) throws SQLException {
+        String sql = "DELETE FROM t_order WHERE order_id=?";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, orderId);
+            preparedStatement.executeUpdate();
+        }
+    }
+    
+    @Override
+    public List<Order> selectAll() throws SQLException {
+        String sql = "SELECT * FROM t_order";
+        return getOrders(sql);
+    }
+    
+    protected List<Order> getOrders(final String sql) throws SQLException {
+        List<Order> result = new LinkedList<>();
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql);
+             ResultSet resultSet = preparedStatement.executeQuery()) {
+            while (resultSet.next()) {
+                Order order = new Order();
+                order.setOrderId(resultSet.getLong(1));
+                order.setUserId(resultSet.getInt(2));
+                order.setAddressId(resultSet.getLong(3));
+                order.setStatus(resultSet.getString(4));
+                result.add(order);
+            }
+        }
+        return result;
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/RangeOrderItemRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/RangeOrderItemRepositoryImpl.java
new file mode 100644
index 0000000..f5c6916
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/RangeOrderItemRepositoryImpl.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository;
+
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.List;
+
+public final class RangeOrderItemRepositoryImpl extends OrderItemRepositoryImpl {
+    
+    public RangeOrderItemRepositoryImpl(final DataSource dataSource) {
+        super(dataSource);
+    }
+    
+    @Override
+    public List<OrderItem> selectAll() throws SQLException {
+        String sql = "SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id AND o.user_id BETWEEN 1 AND 5";
+        return getOrderItems(sql);
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/RangeOrderRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/RangeOrderRepositoryImpl.java
new file mode 100644
index 0000000..4dd0e48
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/RangeOrderRepositoryImpl.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository;
+
+import org.apache.shardingsphere.example.core.api.entity.Order;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.List;
+
+public final class RangeOrderRepositoryImpl extends OrderRepositoryImpl {
+    
+    public RangeOrderRepositoryImpl(final DataSource dataSource) {
+        super(dataSource);
+    }
+    
+    @Override
+    public List<Order> selectAll() throws SQLException {
+        String sql = "SELECT * FROM t_order WHERE order_id BETWEEN 200000000000000000 AND 400000000000000000";
+        return getOrders(sql);
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/UserRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/UserRepositoryImpl.java
new file mode 100644
index 0000000..4ee8909
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/UserRepositoryImpl.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository;
+
+import org.apache.shardingsphere.example.core.api.repository.UserRepository;
+import org.apache.shardingsphere.example.core.api.entity.User;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.LinkedList;
+import java.util.List;
+
+public final class UserRepositoryImpl implements UserRepository {
+    
+    private final DataSource dataSource;
+    
+    public UserRepositoryImpl(final DataSource dataSource) {
+        this.dataSource = dataSource;
+    }
+    
+    @Override
+    public void createTableIfNotExists() throws SQLException {
+        String sql = "CREATE TABLE IF NOT EXISTS t_user (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200), PRIMARY KEY (user_id))";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void dropTable() throws SQLException {
+        String sql = "DROP TABLE t_user";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void truncateTable() throws SQLException {
+        String sql = "TRUNCATE TABLE t_user";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public Long insert(final User entity) throws SQLException {
+        String sql = "INSERT INTO t_user (user_id, user_name, pwd) VALUES (?, ?, ?)";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setInt(1, entity.getUserId());
+            preparedStatement.setString(2, entity.getUserName());
+            preparedStatement.setString(3, entity.getPwd());
+            preparedStatement.executeUpdate();
+        }
+        return (long) entity.getUserId();
+    }
+    
+    @Override
+    public void delete(final Long id) throws SQLException {
+        String sql = "DELETE FROM t_user WHERE user_id=?";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, id);
+            preparedStatement.executeUpdate();
+        }
+    }
+    
+    @Override
+    public List<User> selectAll() throws SQLException {
+        String sql = "SELECT * FROM t_user";
+        return getUsers(sql);
+    }
+    
+    private List<User> getUsers(final String sql) throws SQLException {
+        List<User> result = new LinkedList<>();
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql);
+             ResultSet resultSet = preparedStatement.executeQuery()) {
+            while (resultSet.next()) {
+                User user = new User();
+                user.setUserId(resultSet.getInt("user_id"));
+                user.setUserName(resultSet.getString("user_name"));
+                user.setPwd(resultSet.getString("pwd"));
+                result.add(user);
+            }
+        }
+        return result;
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/AddressRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/AddressRepositoryImpl.java
new file mode 100644
index 0000000..dac1871
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/AddressRepositoryImpl.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository.mysql;
+
+import org.apache.shardingsphere.example.core.api.entity.Address;
+import org.apache.shardingsphere.example.core.api.repository.AddressRepository;
+
+import javax.sql.DataSource;
+import java.sql.*;
+import java.util.LinkedList;
+import java.util.List;
+
+public final class AddressRepositoryImpl implements AddressRepository {
+    
+    private final DataSource dataSource;
+    
+    public AddressRepositoryImpl(final DataSource dataSource) {
+        this.dataSource = dataSource;
+    }
+    
+    @Override
+    public void createTableIfNotExists() throws SQLException {
+        String sql = "CREATE TABLE IF NOT EXISTS t_address "
+            + "(address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id))";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void dropTable() throws SQLException {
+        String sql = "DROP TABLE t_address";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void truncateTable() throws SQLException {
+        String sql = "TRUNCATE TABLE t_address";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public Long insert(final Address entity) throws SQLException {
+        String sql = "INSERT INTO t_address (address_id, address_name) VALUES (?, ?)";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, entity.getAddressId());
+            preparedStatement.setString(2, entity.getAddressName());
+            preparedStatement.executeUpdate();
+        }
+        return entity.getAddressId();
+    }
+    
+    @Override
+    public void delete(final Long primaryKey) throws SQLException {
+        String sql = "DELETE FROM t_address WHERE address_id=?";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, primaryKey);
+            preparedStatement.executeUpdate();
+        }
+    }
+    
+    @Override
+    public List<Address> selectAll() throws SQLException {
+        String sql = "SELECT * FROM t_address";
+        return getAddress(sql);
+    }
+    
+    private List<Address> getAddress(final String sql) throws SQLException {
+        List<Address> result = new LinkedList<>();
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql);
+             ResultSet resultSet = preparedStatement.executeQuery()) {
+            while (resultSet.next()) {
+                Address address = new Address();
+                address.setAddressId(resultSet.getLong(1));
+                address.setAddressName(resultSet.getString(2));
+                result.add(address);
+            }
+        }
+        return result;
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/OrderItemRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/OrderItemRepositoryImpl.java
new file mode 100644
index 0000000..861a678
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/OrderItemRepositoryImpl.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository.mysql;
+
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+import org.apache.shardingsphere.example.core.api.repository.OrderItemRepository;
+
+import javax.sql.DataSource;
+import java.sql.*;
+import java.util.LinkedList;
+import java.util.List;
+
+public class OrderItemRepositoryImpl implements OrderItemRepository {
+    
+    private final DataSource dataSource;
+    
+    public OrderItemRepositoryImpl(final DataSource dataSource) {
+        this.dataSource = dataSource;
+    }
+    
+    @Override
+    public void createTableIfNotExists() throws SQLException {
+        String sql = "CREATE TABLE IF NOT EXISTS t_order_item "
+            + "(order_item_id BIGINT NOT NULL AUTO_INCREMENT, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id))";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void dropTable() throws SQLException {
+        String sql = "DROP TABLE t_order_item";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void truncateTable() throws SQLException {
+        String sql = "TRUNCATE TABLE t_order_item";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public Long insert(final OrderItem orderItem) throws SQLException {
+        String sql = "INSERT INTO t_order_item (order_id, user_id, status) VALUES (?, ?, ?)";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) {
+            preparedStatement.setLong(1, orderItem.getOrderId());
+            preparedStatement.setInt(2, orderItem.getUserId());
+            preparedStatement.setString(3, orderItem.getStatus());
+            preparedStatement.executeUpdate();
+            try (ResultSet resultSet = preparedStatement.getGeneratedKeys()) {
+                if (resultSet.next()) {
+                    orderItem.setOrderItemId(resultSet.getLong(1));
+                }
+            }
+        }
+        return orderItem.getOrderItemId();
+    }
+    
+    @Override
+    public void delete(final Long orderItemId) throws SQLException {
+        String sql = "DELETE FROM t_order_item WHERE order_id=?";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, orderItemId);
+            preparedStatement.executeUpdate();
+        }
+    }
+    
+    @Override
+    public List<OrderItem> selectAll() throws SQLException {
+        // TODO Associated query with encrypt may query and decrypt failed. see https://github.com/apache/incubator-shardingsphere/issues/3352
+//        String sql = "SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id";
+        String sql = "SELECT * FROM t_order_item";
+        return getOrderItems(sql);
+    }
+    
+    protected List<OrderItem> getOrderItems(final String sql) throws SQLException {
+        List<OrderItem> result = new LinkedList<>();
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql);
+             ResultSet resultSet = preparedStatement.executeQuery()) {
+            while (resultSet.next()) {
+                OrderItem orderItem = new OrderItem();
+                orderItem.setOrderItemId(resultSet.getLong(1));
+                orderItem.setOrderId(resultSet.getLong(2));
+                orderItem.setUserId(resultSet.getInt(3));
+                orderItem.setStatus(resultSet.getString(4));
+                result.add(orderItem);
+            }
+        }
+        return result;
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/OrderRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/OrderRepositoryImpl.java
new file mode 100644
index 0000000..b1f8516
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/OrderRepositoryImpl.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository.mysql;
+
+import org.apache.shardingsphere.example.core.api.entity.Order;
+import org.apache.shardingsphere.example.core.api.repository.OrderRepository;
+
+import javax.sql.DataSource;
+import java.sql.*;
+import java.util.LinkedList;
+import java.util.List;
+
+public class OrderRepositoryImpl implements OrderRepository {
+    
+    private final DataSource dataSource;
+    
+    public OrderRepositoryImpl(final DataSource dataSource) {
+        this.dataSource = dataSource;
+    }
+    
+    @Override
+    public void createTableIfNotExists() throws SQLException {
+        String sql = "CREATE TABLE IF NOT EXISTS t_order (order_id BIGINT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, address_id BIGINT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id))";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void dropTable() throws SQLException {
+        String sql = "DROP TABLE t_order";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void truncateTable() throws SQLException {
+        String sql = "TRUNCATE TABLE t_order";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public Long insert(final Order order) throws SQLException {
+        String sql = "INSERT INTO t_order (user_id, address_id, status) VALUES (?, ?, ?)";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) {
+            preparedStatement.setInt(1, order.getUserId());
+            preparedStatement.setLong(2, order.getAddressId());
+            preparedStatement.setString(3, order.getStatus());
+            preparedStatement.executeUpdate();
+            try (ResultSet resultSet = preparedStatement.getGeneratedKeys()) {
+                if (resultSet.next()) {
+                    order.setOrderId(resultSet.getLong(1));
+                }
+            }
+        }
+        return order.getOrderId();
+    }
+    
+    @Override
+    public void delete(final Long orderId) throws SQLException {
+        String sql = "DELETE FROM t_order WHERE order_id=?";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, orderId);
+            preparedStatement.executeUpdate();
+        }
+    }
+    
+    @Override
+    public List<Order> selectAll() throws SQLException {
+        String sql = "SELECT * FROM t_order";
+        return getOrders(sql);
+    }
+    
+    protected List<Order> getOrders(final String sql) throws SQLException {
+        List<Order> result = new LinkedList<>();
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql);
+             ResultSet resultSet = preparedStatement.executeQuery()) {
+            while (resultSet.next()) {
+                Order order = new Order();
+                order.setOrderId(resultSet.getLong(1));
+                order.setUserId(resultSet.getInt(2));
+                order.setAddressId(resultSet.getLong(3));
+                order.setStatus(resultSet.getString(4));
+                result.add(order);
+            }
+        }
+        return result;
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/RangeOrderItemRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/RangeOrderItemRepositoryImpl.java
new file mode 100644
index 0000000..6e02268
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/RangeOrderItemRepositoryImpl.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository.mysql;
+
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.List;
+
+public final class RangeOrderItemRepositoryImpl extends OrderItemRepositoryImpl {
+    
+    public RangeOrderItemRepositoryImpl(final DataSource dataSource) {
+        super(dataSource);
+    }
+    
+    @Override
+    public List<OrderItem> selectAll() throws SQLException {
+        String sql = "SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id AND o.user_id BETWEEN 1 AND 5";
+        return getOrderItems(sql);
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/RangeOrderRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/RangeOrderRepositoryImpl.java
new file mode 100644
index 0000000..b083887
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/RangeOrderRepositoryImpl.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository.mysql;
+
+import org.apache.shardingsphere.example.core.api.entity.Order;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.List;
+
+public final class RangeOrderRepositoryImpl extends OrderRepositoryImpl {
+    
+    public RangeOrderRepositoryImpl(final DataSource dataSource) {
+        super(dataSource);
+    }
+    
+    @Override
+    public List<Order> selectAll() throws SQLException {
+        String sql = "SELECT * FROM t_order WHERE order_id BETWEEN 200000000000000000 AND 400000000000000000";
+        return getOrders(sql);
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/UserRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/UserRepositoryImpl.java
new file mode 100644
index 0000000..4019809
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/mysql/UserRepositoryImpl.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository.mysql;
+
+import org.apache.shardingsphere.example.core.api.entity.User;
+import org.apache.shardingsphere.example.core.api.repository.UserRepository;
+
+import javax.sql.DataSource;
+import java.sql.*;
+import java.util.LinkedList;
+import java.util.List;
+
+public final class UserRepositoryImpl implements UserRepository {
+    
+    private final DataSource dataSource;
+    
+    public UserRepositoryImpl(final DataSource dataSource) {
+        this.dataSource = dataSource;
+    }
+    
+    @Override
+    public void createTableIfNotExists() throws SQLException {
+        String sql = "CREATE TABLE IF NOT EXISTS t_user (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200), PRIMARY KEY (user_id))";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void dropTable() throws SQLException {
+        String sql = "DROP TABLE t_user";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void truncateTable() throws SQLException {
+        String sql = "TRUNCATE TABLE t_user";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public Long insert(final User entity) throws SQLException {
+        String sql = "INSERT INTO t_user (user_id, user_name, pwd) VALUES (?, ?, ?)";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setInt(1, entity.getUserId());
+            preparedStatement.setString(2, entity.getUserName());
+            preparedStatement.setString(3, entity.getPwd());
+            preparedStatement.executeUpdate();
+        }
+        return (long) entity.getUserId();
+    }
+    
+    @Override
+    public void delete(final Long id) throws SQLException {
+        String sql = "DELETE FROM t_user WHERE user_id=?";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, id);
+            preparedStatement.executeUpdate();
+        }
+    }
+    
+    @Override
+    public List<User> selectAll() throws SQLException {
+        String sql = "SELECT * FROM t_user";
+        return getUsers(sql);
+    }
+    
+    private List<User> getUsers(final String sql) throws SQLException {
+        List<User> result = new LinkedList<>();
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql);
+             ResultSet resultSet = preparedStatement.executeQuery()) {
+            while (resultSet.next()) {
+                User user = new User();
+                user.setUserId(resultSet.getInt("user_id"));
+                user.setUserName(resultSet.getString("user_name"));
+                user.setPwd(resultSet.getString("pwd"));
+                result.add(user);
+            }
+        }
+        return result;
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/AddressRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/AddressRepositoryImpl.java
new file mode 100644
index 0000000..6b0f02a
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/AddressRepositoryImpl.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository.postgresql;
+
+import org.apache.shardingsphere.example.core.api.entity.Address;
+import org.apache.shardingsphere.example.core.api.repository.AddressRepository;
+
+import javax.sql.DataSource;
+import java.sql.*;
+import java.util.LinkedList;
+import java.util.List;
+
+public final class AddressRepositoryImpl implements AddressRepository {
+    
+    private final DataSource dataSource;
+    
+    public AddressRepositoryImpl(final DataSource dataSource) {
+        this.dataSource = dataSource;
+    }
+    
+    @Override
+    public void createTableIfNotExists() throws SQLException {
+        String sql = "CREATE TABLE IF NOT EXISTS t_address "
+            + "(address_id BIGSERIAL NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id))";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void dropTable() throws SQLException {
+        String sql = "DROP TABLE t_address";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void truncateTable() throws SQLException {
+        String sql = "TRUNCATE TABLE t_address";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public Long insert(final Address entity) throws SQLException {
+        String sql = "INSERT INTO t_address (address_id, address_name) VALUES (?, ?)";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, entity.getAddressId());
+            preparedStatement.setString(2, entity.getAddressName());
+            preparedStatement.executeUpdate();
+        }
+        return entity.getAddressId();
+    }
+    
+    @Override
+    public void delete(final Long primaryKey) throws SQLException {
+        String sql = "DELETE FROM t_address WHERE address_id=?";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, primaryKey);
+            preparedStatement.executeUpdate();
+        }
+    }
+    
+    @Override
+    public List<Address> selectAll() throws SQLException {
+        String sql = "SELECT * FROM t_address";
+        return getAddress(sql);
+    }
+    
+    private List<Address> getAddress(final String sql) throws SQLException {
+        List<Address> result = new LinkedList<>();
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql);
+             ResultSet resultSet = preparedStatement.executeQuery()) {
+            while (resultSet.next()) {
+                Address address = new Address();
+                address.setAddressId(resultSet.getLong(1));
+                address.setAddressName(resultSet.getString(2));
+                result.add(address);
+            }
+        }
+        return result;
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/OrderItemRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/OrderItemRepositoryImpl.java
new file mode 100644
index 0000000..10b8fed
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/OrderItemRepositoryImpl.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository.postgresql;
+
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+import org.apache.shardingsphere.example.core.api.repository.OrderItemRepository;
+
+import javax.sql.DataSource;
+import java.sql.*;
+import java.util.LinkedList;
+import java.util.List;
+
+public class OrderItemRepositoryImpl implements OrderItemRepository {
+    
+    private final DataSource dataSource;
+    
+    public OrderItemRepositoryImpl(final DataSource dataSource) {
+        this.dataSource = dataSource;
+    }
+    
+    @Override
+    public void createTableIfNotExists() throws SQLException {
+        String sql = "CREATE TABLE IF NOT EXISTS t_order_item "
+            + "(order_item_id BIGSERIAL NOT NULL, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id))";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void dropTable() throws SQLException {
+        String sql = "DROP TABLE t_order_item";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void truncateTable() throws SQLException {
+        String sql = "TRUNCATE TABLE t_order_item";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public Long insert(final OrderItem orderItem) throws SQLException {
+        String sql = "INSERT INTO t_order_item (order_id, user_id, status) VALUES (?, ?, ?)";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) {
+            preparedStatement.setLong(1, orderItem.getOrderId());
+            preparedStatement.setInt(2, orderItem.getUserId());
+            preparedStatement.setString(3, orderItem.getStatus());
+            preparedStatement.executeUpdate();
+            try (ResultSet resultSet = preparedStatement.getGeneratedKeys()) {
+                if (resultSet.next()) {
+                    orderItem.setOrderItemId(resultSet.getLong(1));
+                }
+            }
+        }
+        return orderItem.getOrderItemId();
+    }
+    
+    @Override
+    public void delete(final Long orderItemId) throws SQLException {
+        String sql = "DELETE FROM t_order_item WHERE order_id=?";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, orderItemId);
+            preparedStatement.executeUpdate();
+        }
+    }
+    
+    @Override
+    public List<OrderItem> selectAll() throws SQLException {
+        // TODO Associated query with encrypt may query and decrypt failed. see https://github.com/apache/incubator-shardingsphere/issues/3352
+//        String sql = "SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id";
+        String sql = "SELECT * FROM t_order_item";
+        return getOrderItems(sql);
+    }
+    
+    protected List<OrderItem> getOrderItems(final String sql) throws SQLException {
+        List<OrderItem> result = new LinkedList<>();
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql);
+             ResultSet resultSet = preparedStatement.executeQuery()) {
+            while (resultSet.next()) {
+                OrderItem orderItem = new OrderItem();
+                orderItem.setOrderItemId(resultSet.getLong(1));
+                orderItem.setOrderId(resultSet.getLong(2));
+                orderItem.setUserId(resultSet.getInt(3));
+                orderItem.setStatus(resultSet.getString(4));
+                result.add(orderItem);
+            }
+        }
+        return result;
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/OrderRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/OrderRepositoryImpl.java
new file mode 100644
index 0000000..679aebb
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/OrderRepositoryImpl.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository.postgresql;
+
+import org.apache.shardingsphere.example.core.api.entity.Order;
+import org.apache.shardingsphere.example.core.api.repository.OrderRepository;
+
+import javax.sql.DataSource;
+import java.sql.*;
+import java.util.LinkedList;
+import java.util.List;
+
+public class OrderRepositoryImpl implements OrderRepository {
+    
+    private final DataSource dataSource;
+    
+    public OrderRepositoryImpl(final DataSource dataSource) {
+        this.dataSource = dataSource;
+    }
+    
+    @Override
+    public void createTableIfNotExists() throws SQLException {
+        String sql = "CREATE TABLE IF NOT EXISTS t_order (order_id BIGSERIAL NOT NULL, user_id INT NOT NULL, address_id BIGINT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id))";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void dropTable() throws SQLException {
+        String sql = "DROP TABLE t_order";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void truncateTable() throws SQLException {
+        String sql = "TRUNCATE TABLE t_order";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public Long insert(final Order order) throws SQLException {
+        String sql = "INSERT INTO t_order (user_id, address_id, status) VALUES (?, ?, ?)";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) {
+            preparedStatement.setInt(1, order.getUserId());
+            preparedStatement.setLong(2, order.getAddressId());
+            preparedStatement.setString(3, order.getStatus());
+            preparedStatement.executeUpdate();
+            try (ResultSet resultSet = preparedStatement.getGeneratedKeys()) {
+                if (resultSet.next()) {
+                    order.setOrderId(resultSet.getLong(1));
+                }
+            }
+        }
+        return order.getOrderId();
+    }
+    
+    @Override
+    public void delete(final Long orderId) throws SQLException {
+        String sql = "DELETE FROM t_order WHERE order_id=?";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, orderId);
+            preparedStatement.executeUpdate();
+        }
+    }
+    
+    @Override
+    public List<Order> selectAll() throws SQLException {
+        String sql = "SELECT * FROM t_order";
+        return getOrders(sql);
+    }
+    
+    protected List<Order> getOrders(final String sql) throws SQLException {
+        List<Order> result = new LinkedList<>();
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql);
+             ResultSet resultSet = preparedStatement.executeQuery()) {
+            while (resultSet.next()) {
+                Order order = new Order();
+                order.setOrderId(resultSet.getLong(1));
+                order.setUserId(resultSet.getInt(2));
+                order.setAddressId(resultSet.getLong(3));
+                order.setStatus(resultSet.getString(4));
+                result.add(order);
+            }
+        }
+        return result;
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/RangeOrderItemRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/RangeOrderItemRepositoryImpl.java
new file mode 100644
index 0000000..7a36641
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/RangeOrderItemRepositoryImpl.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository.postgresql;
+
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.List;
+
+public final class RangeOrderItemRepositoryImpl extends OrderItemRepositoryImpl {
+    
+    public RangeOrderItemRepositoryImpl(final DataSource dataSource) {
+        super(dataSource);
+    }
+    
+    @Override
+    public List<OrderItem> selectAll() throws SQLException {
+        String sql = "SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id AND o.user_id BETWEEN 1 AND 5";
+        return getOrderItems(sql);
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/RangeOrderRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/RangeOrderRepositoryImpl.java
new file mode 100644
index 0000000..9582cd2
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/RangeOrderRepositoryImpl.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository.postgresql;
+
+import org.apache.shardingsphere.example.core.api.entity.Order;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.List;
+
+public final class RangeOrderRepositoryImpl extends OrderRepositoryImpl {
+    
+    public RangeOrderRepositoryImpl(final DataSource dataSource) {
+        super(dataSource);
+    }
+    
+    @Override
+    public List<Order> selectAll() throws SQLException {
+        String sql = "SELECT * FROM t_order WHERE order_id BETWEEN 200000000000000000 AND 400000000000000000";
+        return getOrders(sql);
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/UserRepositoryImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/UserRepositoryImpl.java
new file mode 100644
index 0000000..4b78a3f
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/repository/postgresql/UserRepositoryImpl.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.repository.postgresql;
+
+import org.apache.shardingsphere.example.core.api.entity.User;
+import org.apache.shardingsphere.example.core.api.repository.UserRepository;
+
+import javax.sql.DataSource;
+import java.sql.*;
+import java.util.LinkedList;
+import java.util.List;
+
+public final class UserRepositoryImpl implements UserRepository {
+    
+    private final DataSource dataSource;
+    
+    public UserRepositoryImpl(final DataSource dataSource) {
+        this.dataSource = dataSource;
+    }
+    
+    @Override
+    public void createTableIfNotExists() throws SQLException {
+        String sql = "CREATE TABLE IF NOT EXISTS t_user "
+                + "(user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200), pwd_cipher VARCHAR(200), PRIMARY KEY (user_id))";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void dropTable() throws SQLException {
+        String sql = "DROP TABLE t_user";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public void truncateTable() throws SQLException {
+        String sql = "TRUNCATE TABLE t_user";
+        try (Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.executeUpdate(sql);
+        }
+    }
+    
+    @Override
+    public Long insert(final User entity) throws SQLException {
+        String sql = "INSERT INTO t_user (user_id, user_name, pwd) VALUES (?, ?, ?)";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setInt(1, entity.getUserId());
+            preparedStatement.setString(2, entity.getUserName());
+            preparedStatement.setString(3, entity.getPwd());
+            preparedStatement.executeUpdate();
+        }
+        return (long) entity.getUserId();
+    }
+    
+    @Override
+    public void delete(final Long id) throws SQLException {
+        String sql = "DELETE FROM t_user WHERE user_id=?";
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
+            preparedStatement.setLong(1, id);
+            preparedStatement.executeUpdate();
+        }
+    }
+    
+    @Override
+    public List<User> selectAll() throws SQLException {
+        String sql = "SELECT * FROM t_user";
+        return getUsers(sql);
+    }
+    
+    private List<User> getUsers(final String sql) throws SQLException {
+        List<User> result = new LinkedList<>();
+        try (Connection connection = dataSource.getConnection();
+             PreparedStatement preparedStatement = connection.prepareStatement(sql);
+             ResultSet resultSet = preparedStatement.executeQuery()) {
+            while (resultSet.next()) {
+                User user = new User();
+                user.setUserId(resultSet.getInt("user_id"));
+                user.setUserName(resultSet.getString("user_name"));
+                user.setPwd(resultSet.getString("pwd"));
+                result.add(user);
+            }
+        }
+        return result;
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/service/OrderServiceImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/service/OrderServiceImpl.java
new file mode 100644
index 0000000..dcc9ada
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/service/OrderServiceImpl.java
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.service;
+
+import org.apache.shardingsphere.example.core.api.entity.Address;
+import org.apache.shardingsphere.example.core.api.entity.Order;
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+import org.apache.shardingsphere.example.core.api.repository.AddressRepository;
+import org.apache.shardingsphere.example.core.api.repository.OrderItemRepository;
+import org.apache.shardingsphere.example.core.api.repository.OrderRepository;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.api.trace.DatabaseAccess;
+import org.apache.shardingsphere.example.core.api.trace.MemoryLogService;
+import org.apache.shardingsphere.example.core.jdbc.repository.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.OrderRepositoryImpl;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+public final class OrderServiceImpl implements ExampleService {
+    
+    private MemoryLogService memoryLogService = new MemoryLogService();
+    
+    private OrderRepository orderRepository;
+    
+    private OrderItemRepository orderItemRepository;
+    
+    private AddressRepository addressRepository;
+    
+    public OrderServiceImpl(final DataSource dataSource) {
+        this.orderRepository = new OrderRepositoryImpl(dataSource);
+        this.orderItemRepository = new OrderItemRepositoryImpl(dataSource);
+        this.addressRepository = new AddressRepositoryImpl(dataSource);
+    }
+    
+    public OrderServiceImpl(final OrderRepository orderRepository, final OrderItemRepository orderItemRepository, final AddressRepository addressRepository) {
+        this.orderRepository = orderRepository;
+        this.orderItemRepository = orderItemRepository;
+        this.addressRepository = addressRepository;
+    }
+    
+    @Override
+    public void initEnvironment() throws SQLException {
+        orderRepository.createTableIfNotExists();
+        orderItemRepository.createTableIfNotExists();
+        orderRepository.truncateTable();
+        orderItemRepository.truncateTable();
+        initAddressTable();
+    }
+    
+    private void initAddressTable() throws SQLException {
+        addressRepository.createTableIfNotExists();
+        addressRepository.truncateTable();
+        initAddressData();
+    }
+    
+    private void initAddressData() throws SQLException {
+        for (int i = 0; i < 10; i++) {
+            insertAddress(i);
+        }
+    }
+    
+    private void insertAddress(final int i) throws SQLException {
+        Address address = new Address();
+        address.setAddressId((long) i);
+        address.setAddressName("address_" + i);
+        addressRepository.insert(address);
+    }
+    
+    @Override
+    public void cleanEnvironment() throws SQLException {
+        orderRepository.dropTable();
+        orderItemRepository.dropTable();
+        addressRepository.dropTable();
+    }
+    
+    @Override
+    public void processSuccess() throws SQLException {
+        System.out.println("-------------- Process Success Begin ---------------");
+        List<Long> orderIds = insertData();
+        printData();
+        deleteData(orderIds);
+        printData();
+        System.out.println("-------------- Process Success Finish --------------");
+    }
+    
+    @Override
+    public void processFailure() throws SQLException {
+        System.out.println("-------------- Process Failure Begin ---------------");
+        insertData();
+        System.out.println("-------------- Process Failure Finish --------------");
+        throw new RuntimeException("Exception occur for transaction test.");
+    }
+    
+    private List<Long> insertData() throws SQLException {
+        System.out.println("---------------------------- Insert Data ----------------------------");
+        List<Long> result = new ArrayList<>(10);
+        for (int i = 1; i <= 10; i++) {
+            Order order = insertOrder(i);
+            insertOrderItem(i, order);
+            result.add(order.getOrderId());
+        }
+        return result;
+    }
+    
+    private Order insertOrder(final int i) throws SQLException {
+        Order order = new Order();
+        order.setUserId(i);
+        order.setAddressId(i);
+        order.setStatus("INSERT_TEST");
+        orderRepository.insert(order);
+        memoryLogService.putOrderData(DatabaseAccess.INSERT, order);
+        return order;
+    }
+    
+    private void insertOrderItem(final int i, final Order order) throws SQLException {
+        OrderItem item = new OrderItem();
+        item.setOrderId(order.getOrderId());
+        item.setUserId(i);
+        item.setStatus("INSERT_TEST");
+        orderItemRepository.insert(item);
+        memoryLogService.putItemData(DatabaseAccess.INSERT, item);
+    }
+    
+    private void deleteData(final List<Long> orderIds) throws SQLException {
+        System.out.println("---------------------------- Delete Data ----------------------------");
+        for (Long each : orderIds) {
+            orderRepository.delete(each);
+            orderItemRepository.delete(each);
+        }
+    }
+    
+    @Override
+    public void printData() throws SQLException {
+        System.out.println("---------------------------- Print Order Data -----------------------");
+        for (Object each : orderRepository.selectAll()) {
+            System.out.println(each);
+            memoryLogService.putOrderData(DatabaseAccess.SELECT, (Order) each);
+        }
+        System.out.println("---------------------------- Print OrderItem Data -------------------");
+        for (Object each : orderItemRepository.selectAll()) {
+            System.out.println(each);
+            memoryLogService.putItemData(DatabaseAccess.SELECT, (OrderItem) each);
+        }
+    }
+    
+    @Override
+    public MemoryLogService getMemoryLogService() {
+        return memoryLogService;
+    }
+}
diff --git a/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/service/UserServiceImpl.java b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/service/UserServiceImpl.java
new file mode 100644
index 0000000..26d2294
--- /dev/null
+++ b/example-core/example-raw-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/service/UserServiceImpl.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jdbc.service;
+
+import org.apache.shardingsphere.example.core.api.entity.User;
+import org.apache.shardingsphere.example.core.api.repository.UserRepository;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.api.trace.DatabaseAccess;
+import org.apache.shardingsphere.example.core.api.trace.MemoryLogService;
+
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+public final class UserServiceImpl implements ExampleService {
+    
+    private final UserRepository userRepository;
+    
+    private MemoryLogService memoryLogService = new MemoryLogService();
+    
+    
+    public UserServiceImpl(final UserRepository userRepository) {
+        this.userRepository = userRepository;
+    }
+    
+    @Override
+    public void initEnvironment() throws SQLException {
+        userRepository.createTableIfNotExists();
+        userRepository.truncateTable();
+    }
+    
+    @Override
+    public void cleanEnvironment() throws SQLException {
+        userRepository.dropTable();
+    }
+    
+    @Override
+    public void processSuccess() throws SQLException {
+        System.out.println("-------------- Process Success Begin ---------------");
+        List<Long> userIds = insertData();
+        printData();
+        deleteData(userIds);
+        printData();
+        System.out.println("-------------- Process Success Finish --------------");
+    }
+    
+    @Override
+    public void processFailure() throws SQLException {
+        System.out.println("-------------- Process Failure Begin ---------------");
+        insertData();
+        System.out.println("-------------- Process Failure Finish --------------");
+        throw new RuntimeException("Exception occur for transaction test.");
+    }
+    
+    private List<Long> insertData() throws SQLException {
+        System.out.println("---------------------------- Insert Data ----------------------------");
+        List<Long> result = new ArrayList<>(10);
+        for (int i = 1; i <= 10; i++) {
+            User user = new User();
+            user.setUserId(i);
+            user.setUserName("test_" + i);
+            user.setPwd("pwd" + i);
+            userRepository.insert(user);
+            memoryLogService.putUserData(DatabaseAccess.INSERT, user);
+            result.add((long) user.getUserId());
+        }
+        return result;
+    }
+    
+    private void deleteData(final List<Long> userIds) throws SQLException {
+        System.out.println("---------------------------- Delete Data ----------------------------");
+        for (Long each : userIds) {
+            userRepository.delete(each);
+        }
+    }
+    
+    @Override
+    public void printData() throws SQLException {
+        System.out.println("---------------------------- Print User Data -----------------------");
+        for (Object each : userRepository.selectAll()) {
+            System.out.println(each);
+            memoryLogService.putUserData(DatabaseAccess.SELECT, (User) each);
+        }
+    }
+    
+    @Override
+    public MemoryLogService getMemoryLogService() {
+        return memoryLogService;
+    }
+}
diff --git a/example-core/example-spring-jpa/pom.xml b/example-core/example-spring-jpa/pom.xml
new file mode 100644
index 0000000..7a87049
--- /dev/null
+++ b/example-core/example-spring-jpa/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>example-core</artifactId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <artifactId>example-spring-jpa</artifactId>
+    <name>common::example-spring-jpa</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>config-utility</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate.javax.persistence</groupId>
+            <artifactId>hibernate-jpa-2.1-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-entitymanager</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-orm</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context-support</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/common/SpringBootJpaAssertUtils.java b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/common/SpringBootJpaAssertUtils.java
new file mode 100644
index 0000000..ffe385d
--- /dev/null
+++ b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/common/SpringBootJpaAssertUtils.java
@@ -0,0 +1,34 @@
+package org.apache.shardingsphere.example.core.jpa.common;
+
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.api.trace.AssertUtils;
+import org.apache.shardingsphere.example.core.api.trace.DatabaseAccess;
+import org.apache.shardingsphere.example.core.api.trace.MemoryLogService;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+/**
+ * @author wanghaitao
+ * @date 2019/12/13 17:18
+ */
+public class SpringBootJpaAssertUtils implements AssertUtils {
+
+    public static void assertShardingTableDatabases(ExampleService exampleService){
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+    }
+
+    public static void assertMasterSlaves(ExampleService exampleService){
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+    }
+
+    public static void assertShardingMasterSlaves(ExampleService exampleService){
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+    }
+
+}
diff --git a/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/entity/AddressEntity.java b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/entity/AddressEntity.java
new file mode 100644
index 0000000..c84e06a
--- /dev/null
+++ b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/entity/AddressEntity.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jpa.entity;
+
+import org.apache.shardingsphere.example.core.api.entity.Address;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "t_address")
+public final class AddressEntity extends Address {
+    
+    private static final long serialVersionUID = 4743102234543827855L;
+    
+    @Id
+    @Column(name = "address_id")
+    @Override
+    public Long getAddressId() {
+        return super.getAddressId();
+    }
+    
+    @Column(name = "address_name")
+    @Override
+    public String getAddressName() {
+        return super.getAddressName();
+    }
+}
diff --git a/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/entity/OrderEntity.java b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/entity/OrderEntity.java
new file mode 100644
index 0000000..c0c050c
--- /dev/null
+++ b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/entity/OrderEntity.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jpa.entity;
+
+import org.apache.shardingsphere.example.core.api.entity.Order;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "t_order")
+public final class OrderEntity extends Order {
+    
+    private static final long serialVersionUID = 4743102234543827854L;
+    
+    @Id
+    @Column(name = "order_id")
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Override
+    public long getOrderId() {
+        return super.getOrderId();
+    }
+    
+    @Column(name = "user_id")
+    @Override
+    public int getUserId() {
+        return super.getUserId();
+    }
+    
+    @Column(name = "address_id")
+    @Override
+    public long getAddressId() {
+        return super.getAddressId();
+    }
+    
+    @Column(name = "status")
+    @Override
+    public String getStatus() {
+        return super.getStatus();
+    }
+}
diff --git a/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/entity/OrderItemEntity.java b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/entity/OrderItemEntity.java
new file mode 100644
index 0000000..a2125e2
--- /dev/null
+++ b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/entity/OrderItemEntity.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jpa.entity;
+
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "t_order_item")
+public final class OrderItemEntity extends OrderItem {
+    
+    private static final long serialVersionUID = 5685474394188443341L;
+    
+    @Id
+    @Column(name = "order_item_id")
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Override
+    public long getOrderItemId() {
+        return super.getOrderItemId();
+    }
+    
+    @Column(name = "order_id")
+    @Override
+    public long getOrderId() {
+        return super.getOrderId();
+    }
+    
+    @Column(name = "user_id")
+    @Override
+    public int getUserId() {
+        return super.getUserId();
+    }
+    
+    @Column(name = "status")
+    @Override
+    public String getStatus() {
+        return super.getStatus();
+    }
+}
diff --git a/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/entity/UserEntity.java b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/entity/UserEntity.java
new file mode 100644
index 0000000..0ac8fd2
--- /dev/null
+++ b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/entity/UserEntity.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jpa.entity;
+
+import org.apache.shardingsphere.example.core.api.entity.User;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "t_user")
+public final class UserEntity extends User {
+    
+    private static final long serialVersionUID = -3708998745561667721L;
+    
+    @Id
+    @Column(name = "user_id")
+    @Override
+    public int getUserId() {
+        return super.getUserId();
+    }
+    
+    @Column(name = "user_name")
+    @Override
+    public String getUserName() {
+        return super.getUserName();
+    }
+    
+    @Column(name = "user_name_cipher")
+    @Override
+    public String getUserNameCipher() {
+        return super.getUserNameCipher();
+    }
+    
+    @Column(name = "pwd")
+    @Override
+    public String getPwd() {
+        return super.getPwd();
+    }
+    
+    @Column(name = "pwdCipher")
+    @Override
+    public String getPwdCipher() {
+        return super.getPwdCipher();
+    }
+}
diff --git a/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/repository/AddressRepositoryImpl.java b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/repository/AddressRepositoryImpl.java
new file mode 100644
index 0000000..40ace22
--- /dev/null
+++ b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/repository/AddressRepositoryImpl.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jpa.repository;
+
+import org.apache.shardingsphere.example.core.api.entity.Address;
+import org.apache.shardingsphere.example.core.api.repository.AddressRepository;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+import javax.transaction.Transactional;
+import java.util.List;
+
+@Repository
+@Transactional
+public class AddressRepositoryImpl implements AddressRepository {
+    
+    @PersistenceContext
+    private EntityManager entityManager;
+    
+    @Override
+    public void createTableIfNotExists() {
+        throw new UnsupportedOperationException("createTableIfNotExists for JPA");
+    }
+    
+    @Override
+    public void dropTable() {
+        throw new UnsupportedOperationException("dropTable for JPA");
+    }
+    
+    @Override
+    public void truncateTable() {
+        throw new UnsupportedOperationException("truncateTable for JPA");
+    }
+    
+    @Override
+    public Long insert(final Address entity) {
+        entityManager.persist(entity);
+        return entity.getAddressId();
+    }
+    
+    @Override
+    public void delete(final Long addressCode) {
+        Query query = entityManager.createQuery("DELETE FROM AddressEntity i WHERE i.addressCode = ?1");
+        query.setParameter(1, addressCode);
+        query.executeUpdate();
+    }
+    
+    @Override
+    @SuppressWarnings("unchecked")
+    public List<Address> selectAll() {
+        return (List<Address>) entityManager.createQuery("SELECT i FROM AddressEntity i").getResultList();
+    }
+}
diff --git a/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/repository/OrderItemRepositoryImpl.java b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/repository/OrderItemRepositoryImpl.java
new file mode 100644
index 0000000..861f7aa
--- /dev/null
+++ b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/repository/OrderItemRepositoryImpl.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jpa.repository;
+
+import org.apache.shardingsphere.example.core.api.repository.OrderItemRepository;
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+import javax.transaction.Transactional;
+import java.util.List;
+
+@Repository
+@Transactional
+public class OrderItemRepositoryImpl implements OrderItemRepository {
+    
+    @PersistenceContext
+    private EntityManager entityManager;
+    
+    @Override
+    public void createTableIfNotExists() {
+        throw new UnsupportedOperationException("createTableIfNotExists for JPA");
+    }
+    
+    @Override
+    public void truncateTable() {
+        throw new UnsupportedOperationException("truncateTable for JPA");
+    }
+    
+    @Override
+    public void dropTable() {
+        throw new UnsupportedOperationException("dropTable for JPA");
+    }
+    
+    @Override
+    public Long insert(final OrderItem orderItem) {
+        entityManager.persist(orderItem);
+        return orderItem.getOrderItemId();
+    }
+    
+    @Override
+    public void delete(final Long orderItemId) {
+        Query query = entityManager.createQuery("DELETE FROM OrderItemEntity i WHERE i.orderItemId = ?1 AND i.userId = 51");
+        query.setParameter(1, orderItemId);
+        query.executeUpdate();
+    }
+    
+    @Override
+    @SuppressWarnings("unchecked")
+    public List<OrderItem> selectAll() {
+        return (List<OrderItem>) entityManager.createQuery("SELECT i FROM OrderEntity o, OrderItemEntity i WHERE o.orderId = i.orderId").getResultList();
+    }
+}
diff --git a/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/repository/OrderRepositoryImpl.java b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/repository/OrderRepositoryImpl.java
new file mode 100644
index 0000000..5621c3f
--- /dev/null
+++ b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/repository/OrderRepositoryImpl.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jpa.repository;
+
+import org.apache.shardingsphere.example.core.api.repository.OrderRepository;
+import org.apache.shardingsphere.example.core.api.entity.Order;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+import javax.transaction.Transactional;
+import java.util.List;
+
+@Repository
+@Transactional
+public class OrderRepositoryImpl implements OrderRepository {
+    
+    @PersistenceContext
+    private EntityManager entityManager;
+    
+    @Override
+    public void createTableIfNotExists() {
+        throw new UnsupportedOperationException("createTableIfNotExists for JPA");
+    }
+    
+    @Override
+    public void truncateTable() {
+        throw new UnsupportedOperationException("truncateTable for JPA");
+    }
+    
+    @Override
+    public void dropTable() {
+        throw new UnsupportedOperationException("dropTable for JPA");
+    }
+    
+    @Override
+    public Long insert(final Order order) {
+        entityManager.persist(order);
+        return order.getOrderId();
+    }
+    
+    @Override
+    public void delete(final Long orderId) {
+        Query query = entityManager.createQuery("DELETE FROM OrderEntity o WHERE o.orderId = ?1");
+        query.setParameter(1, orderId);
+        query.executeUpdate();
+    }
+    
+    @SuppressWarnings("unchecked")
+    @Override
+    public List<Order> selectAll() {
+        return (List<Order>) entityManager.createQuery("SELECT o FROM OrderEntity o").getResultList();
+    }
+}
diff --git a/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/repository/UserRepositoryImpl.java b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/repository/UserRepositoryImpl.java
new file mode 100644
index 0000000..f6f5b9b
--- /dev/null
+++ b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/repository/UserRepositoryImpl.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jpa.repository;
+
+import org.apache.shardingsphere.example.core.api.repository.UserRepository;
+import org.apache.shardingsphere.example.core.api.entity.User;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+import javax.transaction.Transactional;
+import java.util.List;
+
+@Repository
+@Transactional
+public class UserRepositoryImpl implements UserRepository {
+    
+    @PersistenceContext
+    private EntityManager entityManager;
+    
+    @Override
+    public void createTableIfNotExists() {
+        throw new UnsupportedOperationException("createTableIfNotExists for JPA");
+    }
+    
+    @Override
+    public void dropTable() {
+        throw new UnsupportedOperationException("dropTable for JPA");
+    }
+    
+    @Override
+    public void truncateTable() {
+        throw new UnsupportedOperationException("truncateTable for JPA");
+    }
+    
+    @Override
+    public Long insert(final User entity) {
+        entityManager.persist(entity);
+        return null;
+    }
+    
+    @Override
+    public void delete(final Long id) {
+        Query query = entityManager.createQuery("DELETE FROM UserEntiy o WHERE o.userId = ?1");
+        query.setParameter(1, id.intValue());
+        query.executeUpdate();
+    }
+    
+    @Override
+    @SuppressWarnings("unchecked")
+    public List<User> selectAll() {
+        return (List<User>) entityManager.createQuery("SELECT o FROM UserEntiy o").getResultList();
+    }
+}
diff --git a/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/service/OrderServiceImpl.java b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/service/OrderServiceImpl.java
new file mode 100644
index 0000000..c25b13d
--- /dev/null
+++ b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/service/OrderServiceImpl.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jpa.service;
+
+import org.apache.shardingsphere.example.core.api.repository.AddressRepository;
+import org.apache.shardingsphere.example.core.api.repository.OrderItemRepository;
+import org.apache.shardingsphere.example.core.api.repository.OrderRepository;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.api.trace.DatabaseAccess;
+import org.apache.shardingsphere.example.core.api.trace.MemoryLogService;
+import org.apache.shardingsphere.example.core.jpa.entity.AddressEntity;
+import org.apache.shardingsphere.example.core.jpa.entity.OrderEntity;
+import org.apache.shardingsphere.example.core.jpa.entity.OrderItemEntity;
+import org.springframework.context.annotation.Primary;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+@Primary
+public class OrderServiceImpl implements ExampleService {
+
+    private MemoryLogService memoryLogService = new MemoryLogService();
+
+    @Resource
+    private OrderRepository orderRepository;
+    
+    @Resource
+    private OrderItemRepository orderItemRepository;
+    
+    @Resource
+    private AddressRepository addressRepository;
+
+    @Override
+    public void initEnvironment() throws SQLException {
+        for (int i = 1; i <= 10; i++) {
+            AddressEntity entity = new AddressEntity();
+            entity.setAddressId((long) i);
+            entity.setAddressName("address_" + String.valueOf(i));
+            addressRepository.insert(entity);
+        }
+    }
+    
+    @Override
+    public void cleanEnvironment() {
+    }
+    
+    @Override
+    @Transactional
+    public void processSuccess() throws SQLException {
+        System.out.println("-------------- Process Success Begin ---------------");
+        List<Long> orderIds = insertData();
+        printData();
+        deleteData(orderIds);
+        printData();
+        System.out.println("-------------- Process Success Finish --------------");
+    }
+    
+    @Override
+    @Transactional
+    public void processFailure() throws SQLException {
+        System.out.println("-------------- Process Failure Begin ---------------");
+        insertData();
+        System.out.println("-------------- Process Failure Finish --------------");
+        throw new RuntimeException("Exception occur for transaction test.");
+    }
+
+    private List<Long> insertData() throws SQLException {
+        System.out.println("---------------------------- Insert Data ----------------------------");
+        List<Long> result = new ArrayList<>(10);
+        for (int i = 1; i <= 10; i++) {
+            OrderEntity order = new OrderEntity();
+            order.setUserId(i);
+            order.setAddressId(i);
+            order.setStatus("INSERT_TEST_JPA");
+            orderRepository.insert(order);
+            memoryLogService.putOrderData(DatabaseAccess.INSERT,order);
+            OrderItemEntity item = new OrderItemEntity();
+            item.setOrderId(order.getOrderId());
+            item.setUserId(i);
+            item.setStatus("INSERT_TEST_JPA");
+            orderItemRepository.insert(item);
+            memoryLogService.putItemData(DatabaseAccess.INSERT,item);
+            result.add(order.getOrderId());
+        }
+        return result;
+    }
+
+    private void deleteData(final List<Long> orderIds) throws SQLException {
+        System.out.println("---------------------------- Delete Data ----------------------------");
+        for (Long each : orderIds) {
+            orderRepository.delete(each);
+            orderItemRepository.delete(each);
+        }
+    }
+    
+    @Override
+    public void printData() throws SQLException {
+        System.out.println("---------------------------- Print Order Data -----------------------");
+        for (Object each : orderRepository.selectAll()) {
+            System.out.println(each);
+        }
+        System.out.println("---------------------------- Print OrderItem Data -------------------");
+        for (Object each : orderItemRepository.selectAll()) {
+            System.out.println(each);
+        }
+    }
+
+    @Override
+    public MemoryLogService getMemoryLogService() {
+        return memoryLogService;
+    }
+}
diff --git a/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/service/UserServiceImpl.java b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/service/UserServiceImpl.java
new file mode 100644
index 0000000..4471580
--- /dev/null
+++ b/example-core/example-spring-jpa/src/main/java/org/apache/shardingsphere/example/core/jpa/service/UserServiceImpl.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.jpa.service;
+
+import org.apache.shardingsphere.example.core.api.repository.UserRepository;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.api.trace.MemoryLogService;
+import org.apache.shardingsphere.example.core.jpa.entity.UserEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+@Service("encrypt")
+public class UserServiceImpl implements ExampleService {
+
+    private MemoryLogService memoryLogService = new MemoryLogService();
+
+    @Resource
+    private UserRepository userRepository;
+    
+    @Override
+    public void initEnvironment() {
+    }
+    
+    @Override
+    public void cleanEnvironment() {
+    }
+    
+    @Override
+    @Transactional
+    public void processSuccess() throws SQLException {
+        System.out.println("-------------- Process Success Begin ---------------");
+        List<Long> userIds = insertData();
+        printData();
+        deleteData(userIds);
+        printData();
+        System.out.println("-------------- Process Success Finish --------------");
+    }
+    
+    @Override
+    @Transactional
+    public void processFailure() throws SQLException {
+        System.out.println("-------------- Process Failure Begin ---------------");
+        insertData();
+        System.out.println("-------------- Process Failure Finish --------------");
+        throw new RuntimeException("Exception occur for transaction test.");
+    }
+    
+    private List<Long> insertData() throws SQLException {
+        System.out.println("---------------------------- Insert Data ----------------------------");
+        List<Long> result = new ArrayList<>(10);
+        for (int i = 1; i <= 10; i++) {
+            UserEntity user = new UserEntity();
+            user.setUserId(i);
+            user.setUserName("test_jpa_" + i);
+            user.setPwd("pwd_jpa_" + i);
+            userRepository.insert(user);
+            result.add((long) user.getUserId());
+        }
+        return result;
+    }
+    
+    private void deleteData(final List<Long> userIds) throws SQLException {
+        System.out.println("---------------------------- Delete Data ----------------------------");
+        for (Long each : userIds) {
+            userRepository.delete(each);
+        }
+    }
+    
+    @Override
+    public void printData() throws SQLException {
+        System.out.println("---------------------------- Print User Data -----------------------");
+        for (Object each : userRepository.selectAll()) {
+            System.out.println(each);
+        }
+    }
+
+    @Override
+    public MemoryLogService getMemoryLogService() {
+        return memoryLogService;
+    }
+}
diff --git a/example-core/example-spring-mybatis/pom.xml b/example-core/example-spring-mybatis/pom.xml
new file mode 100644
index 0000000..474ef58
--- /dev/null
+++ b/example-core/example-spring-mybatis/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>example-core</artifactId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <artifactId>example-spring-mybatis</artifactId>
+    <name>common::example-spring-mybatis</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>config-utility</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis</groupId>
+            <artifactId>mybatis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis</groupId>
+            <artifactId>mybatis-spring</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-orm</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context-support</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/common/SpringResultAssertUtils.java b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/common/SpringResultAssertUtils.java
new file mode 100644
index 0000000..9670fe1
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/common/SpringResultAssertUtils.java
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.mybatis.common;
+
+
+import org.apache.shardingsphere.example.core.api.service.CommonService;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.api.service.TransactionService;
+import org.apache.shardingsphere.example.core.api.trace.AssertUtils;
+import org.apache.shardingsphere.example.core.api.trace.DatabaseAccess;
+import org.apache.shardingsphere.example.core.api.trace.MemoryLogService;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class SpringResultAssertUtils implements AssertUtils {
+    
+    public static void assertShardingDatabaseResult(final CommonService commonService) {
+        MemoryLogService memoryLogService = commonService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(10));
+    }
+    
+    public static void assertShardingTableResult(final CommonService commonService) {
+        MemoryLogService memoryLogService = commonService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(10));
+    }
+    
+    public static void assertShardingDatabaseAndTableResult(final CommonService commonService) {
+        MemoryLogService memoryLogService = commonService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(10));
+    }
+    
+    public static void assertMasterSlaveResult(final CommonService commonService) {
+        MemoryLogService memoryLogService = commonService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(0));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(0));
+    }
+    
+    public static void assertExampleServiceMasterSlaveResult(final ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(0));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(0));
+    }
+
+    public static void assertExampleServiceShardingMasterSlaveResult(final ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(0));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(0));
+    }
+    
+    public static void assertShardingMasterSlaveResult(final CommonService commonService) {
+        MemoryLogService memoryLogService = commonService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(0));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(0));
+    }
+    
+    public static void assertEncryptResult(CommonService commonService) {
+        MemoryLogService memoryLogService = commonService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(10));
+    }
+    
+    public static void assertTransactionServiceResult(final TransactionService transactionService) {
+        MemoryLogService memoryLogService = transactionService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(60));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(30));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(60));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(30));
+    }
+    
+    public static void assertTransactionMasterSlaveResult(final TransactionService transactionService) {
+        MemoryLogService memoryLogService = transactionService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(40));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(20));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(40));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(20));
+    }
+    
+    public static void assertShardingMasterSlaveEncryptResult(CommonService commonService) {
+        MemoryLogService memoryLogService = commonService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(0));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(0));
+    }
+    
+    public static void assertExampleServiceEncryptResult(ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getUserData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getUserData(DatabaseAccess.SELECT).size(), is(10));
+    }
+
+    public static void assertExampleServiceShardingEncryptResult(ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getUserData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getUserData(DatabaseAccess.SELECT).size(), is(10));
+    }
+    
+    public static void assertExampleServiceMasterSlaveEncryptResult(ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getUserData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getUserData(DatabaseAccess.SELECT).size(), is(0));
+    }
+    
+    public static void assertTempPgShardingDatabaseAndTableResult(final CommonService commonService) {
+        MemoryLogService memoryLogService = commonService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(20));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(20));
+    }
+    
+    public static void assertExampleServiceShardingDatabaseAndTableResult(final ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(10));
+    }
+    
+    public static void assertTempPgExampleServiceShardingDatabaseAndTableResult(final ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(0));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+    }
+    
+    public static void assertExampleServiceShardingDatabaseResult(final ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(10));
+    }
+    
+    public static void assertExampleServiceShardingTableResult(final  ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.SELECT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.SELECT).size(), is(10));
+    }
+    
+    public static void assertTempPgExampleServiceShardingResult(ExampleService exampleService) {
+        MemoryLogService memoryLogService = exampleService.getMemoryLogService();
+        assertThat(memoryLogService.getOrderData(DatabaseAccess.INSERT).size(), is(10));
+        assertThat(memoryLogService.getOrderItemData(DatabaseAccess.INSERT).size(), is(10));
+    }
+}
diff --git a/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisAddressRepository.java b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisAddressRepository.java
new file mode 100644
index 0000000..749a33e
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisAddressRepository.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.mybatis.repository;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.shardingsphere.example.core.api.repository.AddressRepository;
+
+@Mapper
+public interface MybatisAddressRepository extends AddressRepository {
+}
diff --git a/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisOrderItemRepository.java b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisOrderItemRepository.java
new file mode 100644
index 0000000..d070bd9
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisOrderItemRepository.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.mybatis.repository;
+
+import org.apache.shardingsphere.example.core.api.repository.OrderItemRepository;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface MybatisOrderItemRepository extends OrderItemRepository {
+}
diff --git a/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisOrderRepository.java b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisOrderRepository.java
new file mode 100644
index 0000000..7ce783f
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisOrderRepository.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.mybatis.repository;
+
+import org.apache.shardingsphere.example.core.api.repository.OrderRepository;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface MybatisOrderRepository extends OrderRepository {
+}
diff --git a/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisUserRepository.java b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisUserRepository.java
new file mode 100644
index 0000000..5b3682b
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisUserRepository.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.mybatis.repository;
+
+import org.apache.shardingsphere.example.core.api.repository.UserRepository;
+
+public interface MybatisUserRepository extends UserRepository {
+}
diff --git a/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/OrderServiceImpl.java b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/OrderServiceImpl.java
new file mode 100644
index 0000000..60a6bac
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/OrderServiceImpl.java
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.mybatis.service;
+
+import org.apache.shardingsphere.example.core.api.entity.Address;
+import org.apache.shardingsphere.example.core.api.entity.Order;
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+import org.apache.shardingsphere.example.core.api.repository.AddressRepository;
+import org.apache.shardingsphere.example.core.api.repository.OrderItemRepository;
+import org.apache.shardingsphere.example.core.api.repository.OrderRepository;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.api.trace.DatabaseAccess;
+import org.apache.shardingsphere.example.core.api.trace.MemoryLogService;
+import org.springframework.context.annotation.Primary;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+@Primary
+public class OrderServiceImpl implements ExampleService {
+
+    private MemoryLogService memoryLogService = new MemoryLogService();
+
+    @Resource
+    private OrderRepository orderRepository;
+    
+    @Resource
+    private OrderItemRepository orderItemRepository;
+    
+    @Resource
+    private AddressRepository addressRepository;
+
+    @Override
+    public void initEnvironment() throws SQLException {
+        orderRepository.createTableIfNotExists();
+        orderItemRepository.createTableIfNotExists();
+        orderRepository.truncateTable();
+        orderItemRepository.truncateTable();
+        initAddressTable();
+    }
+    
+    private void initAddressTable() throws SQLException {
+        addressRepository.createTableIfNotExists();
+        addressRepository.truncateTable();
+        for (int i = 1; i <= 10; i++) {
+            Address entity = new Address();
+            entity.setAddressId((long) i);
+            entity.setAddressName("address_" + String.valueOf(i));
+            addressRepository.insert(entity);
+        }
+    }
+
+    @Override
+    public void cleanEnvironment() throws SQLException {
+        orderRepository.dropTable();
+        orderItemRepository.dropTable();
+    }
+    
+    @Override
+//    @Transactional
+    public void processSuccess() throws SQLException {
+        System.out.println("-------------- Process Success Begin ---------------");
+        List<Long> orderIds = insertData();
+        printData();
+        deleteData(orderIds);
+        printData();
+        System.out.println("-------------- Process Success Finish --------------");
+    }
+    
+    @Override
+    @Transactional
+    public void processFailure() throws SQLException {
+        System.out.println("-------------- Process Failure Begin ---------------");
+        insertData();
+        System.out.println("-------------- Process Failure Finish --------------");
+        throw new RuntimeException("Exception occur for transaction test.");
+    }
+
+    private List<Long> insertData() throws SQLException {
+        System.out.println("---------------------------- Insert Data ----------------------------");
+        List<Long> result = new ArrayList<>(10);
+        for (int i = 1; i <= 10; i++) {
+            Order order = new Order();
+            order.setUserId(i);
+            order.setAddressId(i);
+            order.setStatus("INSERT_TEST");
+            orderRepository.insert(order);
+            memoryLogService.putOrderData(DatabaseAccess.INSERT , order);
+            OrderItem item = new OrderItem();
+            item.setOrderId(order.getOrderId());
+            item.setUserId(i);
+            item.setStatus("INSERT_TEST");
+            orderItemRepository.insert(item);
+            memoryLogService.putItemData(DatabaseAccess.INSERT , item);
+            result.add(order.getOrderId());
+        }
+        return result;
+    }
+
+    private void deleteData(final List<Long> orderIds) throws SQLException {
+        System.out.println("---------------------------- Delete Data ----------------------------");
+        for (Long each : orderIds) {
+            orderRepository.delete(each);
+            orderItemRepository.delete(each);
+        }
+    }
+    
+    @Override
+    public void printData() throws SQLException {
+        System.out.println("---------------------------- Print Order Data -----------------------");
+        for (Object each : orderRepository.selectAll()) {
+            System.out.println(each);
+            memoryLogService.putOrderData(DatabaseAccess.SELECT , (Order)each);
+        }
+        System.out.println("---------------------------- Print OrderItem Data -------------------");
+        for (Object each : orderItemRepository.selectAll()) {
+            System.out.println(each);
+            memoryLogService.putItemData(DatabaseAccess.SELECT , (OrderItem) each);
+        }
+    }
+
+    @Override
+    public MemoryLogService getMemoryLogService() {
+        return memoryLogService;
+    }
+}
diff --git a/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/SpringPojoService.java b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/SpringPojoService.java
new file mode 100644
index 0000000..3c7ef13
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/SpringPojoService.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.mybatis.service;
+
+
+import org.apache.shardingsphere.example.core.api.service.CommonService;
+
+public interface SpringPojoService extends CommonService {
+}
diff --git a/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/SpringPojoServiceImpl.java b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/SpringPojoServiceImpl.java
new file mode 100644
index 0000000..b575977
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/SpringPojoServiceImpl.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.mybatis.service;
+
+import org.apache.shardingsphere.example.core.api.entity.Order;
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+import org.apache.shardingsphere.example.core.api.repository.OrderItemRepository;
+import org.apache.shardingsphere.example.core.api.repository.OrderRepository;
+import org.apache.shardingsphere.example.core.api.service.CommonServiceImpl;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+
+@Service
+@Transactional
+public class SpringPojoServiceImpl extends CommonServiceImpl implements SpringPojoService {
+    
+    @Resource
+    private OrderRepository orderRepository;
+    
+    @Resource
+    private OrderItemRepository orderItemRepository;
+    
+    @Override
+    protected OrderRepository getOrderRepository() {
+        return orderRepository;
+    }
+    
+    @Override
+    protected OrderItemRepository getOrderItemRepository() {
+        return orderItemRepository;
+    }
+    
+    @Override
+    protected Order newOrder() {
+        return new Order();
+    }
+    
+    @Override
+    protected OrderItem newOrderItem() {
+        return new OrderItem();
+    }
+}
diff --git a/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/SpringPojoTransactionService.java b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/SpringPojoTransactionService.java
new file mode 100644
index 0000000..2d80fcb
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/SpringPojoTransactionService.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.mybatis.service;
+
+
+import org.apache.shardingsphere.example.core.api.service.TransactionService;
+
+public interface SpringPojoTransactionService extends TransactionService {
+}
diff --git a/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/TempPgSpringPojoService.java b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/TempPgSpringPojoService.java
new file mode 100644
index 0000000..6c7685c
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/TempPgSpringPojoService.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.mybatis.service;
+
+
+import org.apache.shardingsphere.example.core.api.service.CommonService;
+
+public interface TempPgSpringPojoService extends CommonService {
+}
diff --git a/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/TempPgSpringPojoServiceImpl.java b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/TempPgSpringPojoServiceImpl.java
new file mode 100644
index 0000000..fde46ea
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/TempPgSpringPojoServiceImpl.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.mybatis.service;
+
+import org.apache.shardingsphere.example.core.api.entity.Order;
+import org.apache.shardingsphere.example.core.api.entity.OrderItem;
+import org.apache.shardingsphere.example.core.api.repository.OrderItemRepository;
+import org.apache.shardingsphere.example.core.api.repository.OrderRepository;
+import org.apache.shardingsphere.example.core.api.service.TempPgCommonServiceImpl;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+
+@Service
+@Transactional
+public class TempPgSpringPojoServiceImpl extends TempPgCommonServiceImpl implements TempPgSpringPojoService {
+    
+    @Resource
+    private OrderRepository orderRepository;
+    
+    @Resource
+    private OrderItemRepository orderItemRepository;
+    
+    @Override
+    protected OrderRepository getOrderRepository() {
+        return orderRepository;
+    }
+    
+    @Override
+    protected OrderItemRepository getOrderItemRepository() {
+        return orderItemRepository;
+    }
+    
+    @Override
+    protected Order newOrder() {
+        return new Order();
+    }
+    
+    @Override
+    protected OrderItem newOrderItem() {
+        return new OrderItem();
+    }
+}
diff --git a/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/UserServiceImpl.java b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/UserServiceImpl.java
new file mode 100644
index 0000000..5f47b0c
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/service/UserServiceImpl.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.mybatis.service;
+
+import org.apache.shardingsphere.example.core.api.repository.UserRepository;
+import org.apache.shardingsphere.example.core.api.entity.User;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.api.trace.DatabaseAccess;
+import org.apache.shardingsphere.example.core.api.trace.MemoryLogService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+@Service("encrypt")
+public class UserServiceImpl implements ExampleService {
+
+    private MemoryLogService memoryLogService = new MemoryLogService();
+    
+    @Resource
+    private UserRepository userRepository;
+    
+    @Override
+    public void initEnvironment() throws SQLException {
+        userRepository.createTableIfNotExists();
+        userRepository.truncateTable();
+    }
+    
+    @Override
+    public void cleanEnvironment() throws SQLException {
+        userRepository.dropTable();
+    }
+    
+    @Override
+    public void processSuccess() throws SQLException {
+        System.out.println("-------------- Process Success Begin ---------------");
+        List<Long> userIds = insertData();
+        printData();
+        deleteData(userIds);
+        printData();
+        System.out.println("-------------- Process Success Finish --------------");
+    }
+    
+    private List<Long> insertData() throws SQLException {
+        System.out.println("---------------------------- Insert Data ----------------------------");
+        List<Long> result = new ArrayList<>(10);
+        for (int i = 1; i <= 10; i++) {
+            User user = new User();
+            user.setUserId(i);
+            user.setUserName("test_mybatis_" + i);
+            user.setPwd("pwd_mybatis_" + i);
+            userRepository.insert(user);
+            memoryLogService.putUserData(DatabaseAccess.INSERT , user);
+            result.add((long) user.getUserId());
+        }
+        return result;
+    }
+    
+    @Override
+    public void processFailure() throws SQLException {
+        System.out.println("-------------- Process Failure Begin ---------------");
+        insertData();
+        System.out.println("-------------- Process Failure Finish --------------");
+        throw new RuntimeException("Exception occur for transaction test.");
+    }
+    
+    private void deleteData(final List<Long> userIds) throws SQLException {
+        System.out.println("---------------------------- Delete Data ----------------------------");
+        for (Long each : userIds) {
+            userRepository.delete(each);
+        }
+    }
+    
+    @Override
+    public void printData() throws SQLException {
+        System.out.println("---------------------------- Print User Data -----------------------");
+        for (Object each : userRepository.selectAll()) {
+            System.out.println(each);
+            memoryLogService.putUserData(DatabaseAccess.SELECT , (User) each);
+        }
+    }
+
+    @Override
+    public MemoryLogService getMemoryLogService() {
+        return memoryLogService;
+    }
+}
diff --git a/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/mysql/AddressMapper.xml b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/mysql/AddressMapper.xml
new file mode 100644
index 0000000..2ade012
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/mysql/AddressMapper.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.apache.shardingsphere.example.core.mybatis.repository.MybatisAddressRepository">
+    <resultMap id="baseResultMap" type="org.apache.shardingsphere.example.core.api.entity.Address">
+        <result column="address_id" property="addressId" jdbcType="BIGINT"/>
+        <result column="address_name" property="addressName" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <update id="createTableIfNotExists">
+        CREATE TABLE IF NOT EXISTS t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
+    </update>
+    
+    <update id="truncateTable">
+        TRUNCATE TABLE t_address;
+    </update>
+    
+    <update id="dropTable">
+        DROP TABLE IF EXISTS t_address;
+    </update>
+    
+    <insert id="insert">
+        INSERT INTO t_address (address_id, address_name) VALUES (#{addressId,jdbcType=BIGINT}, #{addressName,jdbcType=VARCHAR});
+    </insert>
+    
+    <delete id="delete">
+        DELETE FROM t_address WHERE address_id = #{addressId,jdbcType=BIGINT};
+    </delete>
+    
+    <select id="selectAll" resultMap="baseResultMap">
+        SELECT * FROM t_address;
+    </select>
+    
+</mapper>
diff --git a/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/mysql/OrderItemMapper.xml b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/mysql/OrderItemMapper.xml
new file mode 100644
index 0000000..1cb35e2
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/mysql/OrderItemMapper.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.apache.shardingsphere.example.core.mybatis.repository.MybatisOrderItemRepository">
+    <resultMap id="baseResultMap" type="org.apache.shardingsphere.example.core.api.entity.OrderItem">
+        <result column="order_item_id" property="orderItemId" jdbcType="INTEGER"/>
+        <result column="order_id" property="orderId" jdbcType="INTEGER"/>
+        <result column="user_id" property="userId" jdbcType="INTEGER"/>
+        <result column="status" property="status" jdbcType="VARCHAR"/>
+    </resultMap>
+    
+    <update id="createTableIfNotExists">
+        CREATE TABLE IF NOT EXISTS t_order_item (order_item_id BIGINT AUTO_INCREMENT, order_id BIGINT, user_id INT NOT NULL, status VARCHAR(50) , PRIMARY KEY (order_item_id));
+    </update>
+    
+    <update id="truncateTable">
+        TRUNCATE TABLE t_order_item;
+    </update>
+    
+    <update id="dropTable">
+        DROP TABLE IF EXISTS t_order_item;
+    </update>
+    
+    <insert id="insert" useGeneratedKeys="true" keyProperty="orderItemId">
+        INSERT INTO t_order_item (order_id, user_id, status) VALUES (#{orderId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR});
+    </insert>
+    
+    <delete id="delete">
+        DELETE FROM t_order_item WHERE order_id = #{orderId,jdbcType=INTEGER};
+    </delete>
+    
+    <select id="selectAll" resultMap="baseResultMap">
+        SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id;
+    </select>
+    
+    <select id="selectRange" resultMap="baseResultMap">
+        SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id AND o.user_id BETWEEN 1 AND 5
+    </select>
+</mapper>
diff --git a/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/mysql/OrderMapper.xml b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/mysql/OrderMapper.xml
new file mode 100644
index 0000000..222c077
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/mysql/OrderMapper.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.apache.shardingsphere.example.core.mybatis.repository.MybatisOrderRepository">
+    <resultMap id="baseResultMap" type="org.apache.shardingsphere.example.core.api.entity.Order">
+        <result column="order_id" property="orderId" jdbcType="BIGINT"/>
+        <result column="user_id" property="userId" jdbcType="INTEGER"/>
+        <result column="address_id" property="addressId" jdbcType="BIGINT"/>
+        <result column="status" property="status" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <update id="createTableIfNotExists">
+        CREATE TABLE IF NOT EXISTS t_order (order_id BIGINT AUTO_INCREMENT, user_id INT NOT NULL, address_id BIGINT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+    </update>
+    
+    <update id="truncateTable">
+        TRUNCATE TABLE t_order;
+    </update>
+    
+    <update id="dropTable">
+        DROP TABLE IF EXISTS t_order;
+    </update>
+    
+    <insert id="insert" useGeneratedKeys="true" keyProperty="orderId">
+        INSERT INTO t_order (user_id, address_id, status) VALUES (#{userId,jdbcType=INTEGER}, #{addressId,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR});
+    </insert>
+    
+    <delete id="delete">
+        DELETE FROM t_order WHERE order_id = #{orderId,jdbcType=INTEGER};
+    </delete>
+    
+    <select id="selectAll" resultMap="baseResultMap">
+        SELECT * FROM t_order;
+    </select>
+    
+    <select id="selectRange" resultMap="baseResultMap">
+        SELECT * FROM t_order WHERE order_id BETWEEN 200000000000000000 AND 400000000000000000
+    </select>
+</mapper>
diff --git a/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/mysql/UserMapper.xml b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/mysql/UserMapper.xml
new file mode 100644
index 0000000..1233ce5
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/mysql/UserMapper.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.apache.shardingsphere.example.core.mybatis.repository.MybatisUserRepository">
+    <resultMap id="baseResultMap" type="org.apache.shardingsphere.example.core.api.entity.User">
+        <result column="user_id" property="userId" jdbcType="INTEGER"/>
+        <result column="user_name" property="userName" jdbcType="VARCHAR"/>
+        <result column="pwd" property="pwd" jdbcType="VARCHAR"/>
+        <result column="pwd_plain" property="pwdPlain" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <update id="createTableIfNotExists">
+        CREATE TABLE IF NOT EXISTS t_user (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200), PRIMARY KEY (user_id));
+    </update>
+
+    <update id="truncateTable">
+        TRUNCATE TABLE t_user;
+    </update>
+
+    <update id="dropTable">
+        DROP TABLE IF EXISTS t_user;
+    </update>
+
+    <insert id="insert">
+        INSERT INTO t_user (user_id, user_name, pwd) VALUES (#{userId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{pwd,jdbcType=VARCHAR})
+    </insert>
+
+    <delete id="delete">
+        DELETE FROM t_user WHERE user_id = #{userId,jdbcType=INTEGER};
+    </delete>
+
+    <select id="selectAll" resultMap="baseResultMap">
+        SELECT * FROM t_user;
+    </select>
+</mapper>
diff --git a/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/postgresql/AddressMapper.xml b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/postgresql/AddressMapper.xml
new file mode 100644
index 0000000..4cb1d83
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/postgresql/AddressMapper.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.apache.shardingsphere.example.core.mybatis.repository.MybatisAddressRepository">
+    <resultMap id="baseResultMap" type="org.apache.shardingsphere.example.core.api.entity.Address">
+        <result column="address_id" property="addressId" jdbcType="BIGINT"/>
+        <result column="address_name" property="addressName" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <update id="createTableIfNotExists">
+        CREATE TABLE IF NOT EXISTS t_address (address_id BIGSERIAL NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
+    </update>
+    
+    <update id="truncateTable">
+        TRUNCATE TABLE t_address;
+    </update>
+    
+    <update id="dropTable">
+        DROP TABLE IF EXISTS t_address;
+    </update>
+    
+    <insert id="insert">
+        INSERT INTO t_address (address_id, address_name) VALUES (#{addressId,jdbcType=BIGINT}, #{addressName,jdbcType=VARCHAR});
+    </insert>
+    
+    <delete id="delete">
+        DELETE FROM t_address WHERE address_id = #{addressId,jdbcType=BIGINT};
+    </delete>
+    
+    <select id="selectAll" resultMap="baseResultMap">
+        SELECT * FROM t_address;
+    </select>
+    
+</mapper>
diff --git a/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/postgresql/OrderItemMapper.xml b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/postgresql/OrderItemMapper.xml
new file mode 100644
index 0000000..579d7a1
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/postgresql/OrderItemMapper.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.apache.shardingsphere.example.core.mybatis.repository.MybatisOrderItemRepository">
+    <resultMap id="baseResultMap" type="org.apache.shardingsphere.example.core.api.entity.OrderItem">
+        <result column="order_item_id" property="orderItemId" jdbcType="INTEGER"/>
+        <result column="order_id" property="orderId" jdbcType="INTEGER"/>
+        <result column="user_id" property="userId" jdbcType="INTEGER"/>
+        <result column="status" property="status" jdbcType="VARCHAR"/>
+    </resultMap>
+    
+    <update id="createTableIfNotExists">
+        CREATE TABLE IF NOT EXISTS t_order_item (order_item_id BIGSERIAL NOT NULL, order_id BIGINT, user_id INT NOT NULL, status VARCHAR(50) , PRIMARY KEY (order_item_id));
+    </update>
+    
+    <update id="truncateTable">
+        TRUNCATE TABLE t_order_item;
+    </update>
+    
+    <update id="dropTable">
+        DROP TABLE IF EXISTS t_order_item;
+    </update>
+    
+    <insert id="insert" useGeneratedKeys="true" keyProperty="orderItemId">
+        INSERT INTO t_order_item (order_id, user_id, status) VALUES (#{orderId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR});
+    </insert>
+    
+    <delete id="delete">
+        DELETE FROM t_order_item WHERE order_id = #{orderId,jdbcType=INTEGER};
+    </delete>
+    
+    <select id="selectAll" resultMap="baseResultMap">
+        SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id;
+    </select>
+    
+    <select id="selectRange" resultMap="baseResultMap">
+        SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id AND o.user_id BETWEEN 1 AND 5
+    </select>
+</mapper>
diff --git a/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/postgresql/OrderMapper.xml b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/postgresql/OrderMapper.xml
new file mode 100644
index 0000000..12196f4
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/postgresql/OrderMapper.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.apache.shardingsphere.example.core.mybatis.repository.MybatisOrderRepository">
+    <resultMap id="baseResultMap" type="org.apache.shardingsphere.example.core.api.entity.Order">
+        <result column="order_id" property="orderId" jdbcType="BIGINT"/>
+        <result column="user_id" property="userId" jdbcType="INTEGER"/>
+        <result column="address_id" property="addressId" jdbcType="BIGINT"/>
+        <result column="status" property="status" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <update id="createTableIfNotExists">
+        CREATE TABLE IF NOT EXISTS t_order (order_id BIGSERIAL NOT NULL, user_id INT NOT NULL, address_id BIGINT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+    </update>
+    
+    <update id="truncateTable">
+        TRUNCATE TABLE t_order;
+    </update>
+    
+    <update id="dropTable">
+        DROP TABLE IF EXISTS t_order CASCADE;
+    </update>
+    
+    <insert id="insert" useGeneratedKeys="true" keyProperty="orderId">
+        INSERT INTO t_order (user_id, address_id, status) VALUES (#{userId,jdbcType=INTEGER}, #{addressId,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR});
+    </insert>
+    
+    <delete id="delete">
+        DELETE FROM t_order WHERE order_id = #{orderId,jdbcType=INTEGER};
+    </delete>
+    
+    <select id="selectAll" resultMap="baseResultMap">
+        SELECT * FROM t_order;
+    </select>
+    
+    <select id="selectRange" resultMap="baseResultMap">
+        SELECT * FROM t_order WHERE order_id BETWEEN 200000000000000000 AND 400000000000000000
+    </select>
+</mapper>
diff --git a/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/postgresql/UserMapper.xml b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/postgresql/UserMapper.xml
new file mode 100644
index 0000000..59b0aca
--- /dev/null
+++ b/example-core/example-spring-mybatis/src/main/resources/META-INF/mappers/postgresql/UserMapper.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.apache.shardingsphere.example.core.mybatis.repository.MybatisUserRepository">
+    <resultMap id="baseResultMap" type="org.apache.shardingsphere.example.core.api.entity.User">
+        <result column="user_id" property="userId" jdbcType="INTEGER"/>
+        <result column="user_name" property="userName" jdbcType="VARCHAR"/>
+        <result column="pwd" property="pwd" jdbcType="VARCHAR"/>
+        <result column="pwd_plain" property="pwdPlain" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <update id="createTableIfNotExists">
+        CREATE TABLE IF NOT EXISTS t_user (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain 
+        VARCHAR(200), PRIMARY KEY (user_id));
+    </update>
+
+    <update id="truncateTable">
+        TRUNCATE TABLE t_user;
+    </update>
+
+    <update id="dropTable">
+        DROP TABLE IF EXISTS t_user;
+    </update>
+
+    <insert id="insert">
+        INSERT INTO t_user (user_id, user_name, pwd) VALUES (#{userId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{pwd,jdbcType=VARCHAR})
+    </insert>
+
+    <delete id="delete">
+        DELETE FROM t_user WHERE user_id = #{userId,jdbcType=INTEGER};
+    </delete>
+
+    <select id="selectAll" resultMap="baseResultMap">
+        SELECT * FROM t_user;
+    </select>
+</mapper>
diff --git a/example-core/pom.xml b/example-core/pom.xml
new file mode 100644
index 0000000..1e4ad05
--- /dev/null
+++ b/example-core/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>shardingsphere-example</artifactId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <artifactId>example-core</artifactId>
+    <name>common::root</name>
+    
+    <packaging>pom</packaging>
+    
+    <modules>
+        <module>config-utility</module>
+        <module>example-api</module>
+        <module>example-raw-jdbc</module>
+        <module>example-spring-mybatis</module>
+        <module>example-spring-jpa</module>
+    </modules>
+</project>
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..d5440c1
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,316 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>shardingsphere-example</artifactId>
+    <version>4.0.0-RC4-SNAPSHOT</version>
+    
+    <modules>
+        <module>example-core</module>
+        <module>sharding-jdbc-example</module>
+        <module>sharding-proxy-example</module>
+    </modules>
+    
+    <name>AcceptanceTest::root</name>
+    
+    <packaging>pom</packaging>
+    
+    <properties>
+        <java.version>1.7</java.version>
+        <maven.version.range>[3.0.4,)</maven.version.range>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.build.locale>zh_CN</project.build.locale>
+        
+        <shardingsphere.version>4.0.0</shardingsphere.version>
+        <shardingsphere.spi.impl.version>4.0.0</shardingsphere.spi.impl.version>
+        
+        <aspectjweaver.version>1.8.9</aspectjweaver.version>
+        <spring-framework.version>4.3.20.RELEASE</spring-framework.version>
+        <spring-boot.version>1.5.17.RELEASE</spring-boot.version>
+        <hikari-cp.version>2.4.11</hikari-cp.version>
+        <mysql-connector-java.version>5.1.42</mysql-connector-java.version>
+        <postgresql.version>42.2.5</postgresql.version>
+        <slf4j.version>1.7.7</slf4j.version>
+        <logback.version>1.2.0</logback.version>
+        
+        <mybatis.version>3.4.2</mybatis.version>
+        <mybatis-spring.version>1.3.0</mybatis-spring.version>
+        <jpa.version>1.0.0.Final</jpa.version>
+        <hibernate.version>5.4.10.Final</hibernate.version>
+    
+        <seata.version>0.5.1</seata.version>
+
+        <junit.version>4.12</junit.version>
+        <hamcrest.version>1.3</hamcrest.version>
+        <mockito.version>2.7.21</mockito.version>
+        
+        <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
+        <maven-resources-plugin.version>2.7</maven-resources-plugin.version>
+        <maven-jar-plugin.version>2.6</maven-jar-plugin.version>
+        <maven-source-plugin.version>2.4</maven-source-plugin.version>
+        
+        <javadocExecutable>${java.home}/../bin/javadoc</javadocExecutable>
+    </properties>
+    
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>sharding-core-api</artifactId>
+                <version>${shardingsphere.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>sharding-jdbc-core</artifactId>
+                <version>${shardingsphere.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>sharding-jdbc-orchestration</artifactId>
+                <version>${shardingsphere.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>sharding-transaction-core</artifactId>
+                <version>${shardingsphere.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>sharding-transaction-xa-core</artifactId>
+                <version>${shardingsphere.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>sharding-transaction-base-seata-at</artifactId>
+                <version>${shardingsphere.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>sharding-jdbc-spring-boot-starter</artifactId>
+                <version>${shardingsphere.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>sharding-jdbc-orchestration-spring-boot-starter</artifactId>
+                <version>${shardingsphere.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>sharding-jdbc-spring-namespace</artifactId>
+                <version>${shardingsphere.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>sharding-jdbc-orchestration-spring-namespace</artifactId>
+                <version>${shardingsphere.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>sharding-orchestration-reg-zookeeper-curator</artifactId>
+                <version>${shardingsphere.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.shardingsphere</groupId>
+                <artifactId>sharding-orchestration-reg-etcd</artifactId>
+                <version>${shardingsphere.spi.impl.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>encrypt-core-merge</artifactId>
+                <version>${shardingsphere.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.shardingsphere</groupId>
+                <artifactId>encrypt-core-rewrite</artifactId>
+                <version>${shardingsphere.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.aspectj</groupId>
+                <artifactId>aspectjweaver</artifactId>
+                <version>${aspectjweaver.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-jdbc</artifactId>
+                <version>${spring-framework.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-orm</artifactId>
+                <version>${spring-framework.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-context-support</artifactId>
+                <version>${spring-framework.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-tx</artifactId>
+                <version>${spring-framework.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.hibernate.javax.persistence</groupId>
+                <artifactId>hibernate-jpa-2.1-api</artifactId>
+                <version>${jpa.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.hibernate</groupId>
+                <artifactId>hibernate-core</artifactId>
+                <version>${hibernate.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.hibernate</groupId>
+                <artifactId>hibernate-entitymanager</artifactId>
+                <version>${hibernate.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-data-jpa</artifactId>
+                <version>${spring-boot.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-aop</artifactId>
+                <version>${spring-boot.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.mybatis</groupId>
+                <artifactId>mybatis</artifactId>
+                <version>${mybatis.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.mybatis</groupId>
+                <artifactId>mybatis-spring</artifactId>
+                <version>${mybatis-spring.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.mybatis.spring.boot</groupId>
+                <artifactId>mybatis-spring-boot-starter</artifactId>
+                <version>${mybatis-spring.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.seata</groupId>
+                <artifactId>seata-rm-datasource</artifactId>
+                <version>${seata.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.seata</groupId>
+                <artifactId>seata-tm</artifactId>
+                <version>${seata.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-test</artifactId>
+                <version>${spring-boot.version}</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-test</artifactId>
+                <version>${spring-framework.version}</version>
+                <scope>test</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+    
+    <dependencies>
+        <dependency>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP-java7</artifactId>
+            <version>${hikari-cp.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>${mysql-connector-java.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <version>${postgresql.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jcl-over-slf4j</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>${logback.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hamcrest</groupId>
+            <artifactId>hamcrest-library</artifactId>
+            <version>${hamcrest.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <version>${mockito.version}</version>
+            <scope>provided</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.hamcrest</groupId>
+                    <artifactId>hamcrest-core</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-inline</artifactId>
+            <version>${mockito.version}</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+    
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>${java.version}</source>
+                    <target>${java.version}</target>
+                    <testSource>${java.version}</testSource>
+                    <testTarget>${java.version}</testTarget>
+                </configuration>
+                <version>${maven-compiler-plugin.version}</version>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>${maven-resources-plugin.version}</version>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>${maven-jar-plugin.version}</version>
+            </plugin>
+            <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <version>${maven-source-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>jar-no-fork</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/pom.xml b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/pom.xml
new file mode 100644
index 0000000..e9f5980
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/pom.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>orchestration-example</artifactId>
+    <version>4.0.0-RC4-SNAPSHOT</version>
+  </parent>
+  <groupId>org.apache.shardingsphere.example</groupId>
+  <artifactId>orchestration-raw-jdbc-mysql-example</artifactId>
+
+  <name>AcceptanceTest::orchestration::mysql::raw-jdbc</name>
+  <!-- FIXME change it to the project's website -->
+  <url>http://www.example.com</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.11</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>config-utility</artifactId>
+      <version>${project.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>example-api</artifactId>
+      <version>${project.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>example-raw-jdbc</artifactId>
+      <version>${project.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere</groupId>
+      <artifactId>sharding-orchestration-reg-api</artifactId>
+      <version>${shardingsphere.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere</groupId>
+      <artifactId>sharding-jdbc-orchestration</artifactId>
+      <version>${shardingsphere.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere</groupId>
+      <artifactId>sharding-orchestration-reg-zookeeper-curator</artifactId>
+      <version>${shardingsphere.version}</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+      <plugins>
+        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+        <plugin>
+          <artifactId>maven-clean-plugin</artifactId>
+          <version>3.1.0</version>
+        </plugin>
+        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+        <plugin>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.8.0</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.22.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-install-plugin</artifactId>
+          <version>2.5.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <version>2.8.2</version>
+        </plugin>
+        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+        <plugin>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.7.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-project-info-reports-plugin</artifactId>
+          <version>3.0.0</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
new file mode 100644
index 0000000..35bc670
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
new file mode 100644
index 0000000..d1fa1f3
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaMasterSlaveTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
new file mode 100644
index 0000000..b908fd3
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
new file mode 100644
index 0000000..8037a76
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlave {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
new file mode 100644
index 0000000..ac644f3
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlaveEncrypt {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaveEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
new file mode 100644
index 0000000..d577890
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingTest {
+     @Test
+    public void assertCommonService() throws SQLException {
+         DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_DATABASES_AND_TABLES);
+         ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+         ExampleExecuteTemplate.run(exampleService);
+         RawJdbcAssertUtils.assertShardingTableDatabases(exampleService);
+     }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlEncryptTest.java
new file mode 100644
index 0000000..687bad0
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlMasterSlaveTest.java
new file mode 100644
index 0000000..d619eeb
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlMasterSlaveTest.java
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlMasterSlaveTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingEncryptTest.java
new file mode 100644
index 0000000..042c20a
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..b2c0334
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingMasterSlaveEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaveEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveTest.java
new file mode 100644
index 0000000..4b47c63
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveTest.java
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingMasterSlaveTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingTest.java
new file mode 100644
index 0000000..48f539c
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingTest.java
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_DATABASES_AND_TABLES);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingTableDatabases(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/EncryptConfiguration.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/EncryptConfiguration.java
new file mode 100644
index 0000000..f53d7ae
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/EncryptConfiguration.java
@@ -0,0 +1,54 @@
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.encrypt.EncryptColumnRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptTableRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptorRuleConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.orchestration.config.OrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.reg.api.RegistryCenterConfiguration;
+import org.apache.shardingsphere.shardingjdbc.api.EncryptDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.OrchestrationEncryptDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class EncryptConfiguration implements ExampleConfiguration {
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        return OrchestrationEncryptDataSourceFactory.createDataSource(
+                DataSourceUtil.createDataSource("demo_ds", DatabaseType.MYSQL),
+                getEncryptRuleConfiguration(),
+                new Properties(),
+                new OrchestrationConfiguration("orchestration-mysql-encrypt", getRegistryCenterConfiguration(), true));
+    }
+
+    private EncryptRuleConfiguration getEncryptRuleConfiguration() {
+        Properties props = new Properties();
+        props.setProperty("aes.key.value", "123456");
+        EncryptorRuleConfiguration encryptorAES = new EncryptorRuleConfiguration("AES", props);
+        EncryptorRuleConfiguration encryptorMD5 = new EncryptorRuleConfiguration("MD5",new Properties());
+        Map<String, EncryptColumnRuleConfiguration> columns = new HashMap<>();
+        EncryptColumnRuleConfiguration columnUserName = new EncryptColumnRuleConfiguration("user_name", "user_name_cipher", "", "aes");
+        EncryptColumnRuleConfiguration columnPwd = new EncryptColumnRuleConfiguration("pwd_plain", "pwd_cipher", "", "md5");
+        columns.put("user_name",columnUserName);
+        columns.put("pwd",columnPwd);
+        EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration(columns);
+        EncryptRuleConfiguration result = new EncryptRuleConfiguration();
+        result.getEncryptors().put("aes", encryptorAES);
+        result.getEncryptors().put("md5",encryptorMD5);
+        result.getTables().put("t_user", tableConfig);
+        return result;
+    }
+    private RegistryCenterConfiguration getRegistryCenterConfiguration() {
+        RegistryCenterConfiguration regConfig = new RegistryCenterConfiguration("zookeeper");
+        regConfig.setServerLists("localhost:2181");
+        regConfig.setNamespace("orchestration-raw-jdbc-mysql");
+        return regConfig;
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/MasterSlaveConfiguration.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/MasterSlaveConfiguration.java
new file mode 100644
index 0000000..1894d3d
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/MasterSlaveConfiguration.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.masterslave.MasterSlaveRuleConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.orchestration.config.OrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.reg.api.RegistryCenterConfiguration;
+import org.apache.shardingsphere.shardingjdbc.api.MasterSlaveDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.OrchestrationMasterSlaveDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public final class MasterSlaveConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig = new MasterSlaveRuleConfiguration("demo_ds_master_slave", "demo_ds_master", Arrays.asList("demo_ds_slave_0", "demo_ds_slave_1"));
+        return OrchestrationMasterSlaveDataSourceFactory.createDataSource(
+                createDataSourceMap(),
+                masterSlaveRuleConfig,
+                new Properties(),
+                new OrchestrationConfiguration("orchestration-mysql-master-slave",getRegistryCenterConfiguration(),true));
+    }
+    
+    private Map<String, DataSource> createDataSourceMap() {
+        Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_master", DataSourceUtil.createDataSource("demo_ds_master", DatabaseType.MYSQL));
+        result.put("demo_ds_slave_0", DataSourceUtil.createDataSource("demo_ds_slave_0", DatabaseType.MYSQL));
+        result.put("demo_ds_slave_1", DataSourceUtil.createDataSource("demo_ds_slave_1", DatabaseType.MYSQL));
+        return result;
+    }
+    private RegistryCenterConfiguration getRegistryCenterConfiguration() {
+        RegistryCenterConfiguration regConfig = new RegistryCenterConfiguration("zookeeper");
+        regConfig.setServerLists("localhost:2181");
+        regConfig.setNamespace("orchestration-raw-jdbc-mysql");
+        return regConfig;
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingConfiguration.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingConfiguration.java
new file mode 100644
index 0000000..9a5d454
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingConfiguration.java
@@ -0,0 +1,75 @@
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.sharding.KeyGeneratorConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.StandardShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.algorithm.PreciseModuloShardingTableAlgorithm;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.orchestration.config.OrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.reg.api.RegistryCenterConfiguration;
+import org.apache.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.OrchestrationShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class ShardingConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderTableRuleConfiguration());
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderItemTableRuleConfiguration());
+        shardingRuleConfig.getBindingTableGroups().add("t_order, t_order_item");
+        shardingRuleConfig.getBroadcastTables().add("t_address");
+        shardingRuleConfig.setDefaultDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        shardingRuleConfig.setDefaultTableShardingStrategyConfig(new StandardShardingStrategyConfiguration("order_id", new PreciseModuloShardingTableAlgorithm()));
+        return OrchestrationShardingDataSourceFactory.createDataSource(
+                createDataSourceMap()
+                , shardingRuleConfig
+                , new Properties()
+                ,new OrchestrationConfiguration("orchestration-mysql-sharding",getRegistryCenterConfiguration(),true));
+    }
+
+    private static TableRuleConfiguration getOrderTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order", "demo_ds_${0..1}.t_order_${0..1}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_${order_id % 2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_id", getProperties()));
+        return result;
+    }
+
+    private static TableRuleConfiguration getOrderItemTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order_item", "demo_ds_${0..1}.t_order_item_${0..1}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_item_${order_id % 2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_item_id", getProperties()));
+        return result;
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_0", DataSourceUtil.createDataSource("demo_ds_0", DatabaseType.MYSQL));
+        result.put("demo_ds_1", DataSourceUtil.createDataSource("demo_ds_1", DatabaseType.MYSQL));
+        return result;
+    }
+
+    private RegistryCenterConfiguration getRegistryCenterConfiguration() {
+        RegistryCenterConfiguration regConfig = new RegistryCenterConfiguration("zookeeper");
+        regConfig.setServerLists("localhost:2181");
+        regConfig.setNamespace("orchestration-raw-jdbc-mysql");
+        return regConfig;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingEncryptConfiguration.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingEncryptConfiguration.java
new file mode 100644
index 0000000..f1c48bc
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingEncryptConfiguration.java
@@ -0,0 +1,80 @@
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.encrypt.EncryptColumnRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptTableRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptorRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.orchestration.config.OrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.reg.api.RegistryCenterConfiguration;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.OrchestrationShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class ShardingEncryptConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getTableRuleConfiguration());
+        shardingRuleConfig.setEncryptRuleConfig(getEncryptRuleConfiguration());
+        return OrchestrationShardingDataSourceFactory.createDataSource(
+                createDataSourceMap()
+                , shardingRuleConfig
+                , new Properties()
+                ,new OrchestrationConfiguration("orchestration-mysql-sharding-encrypt",getRegistryCenterConfiguration(),true));
+    }
+
+    private static TableRuleConfiguration getTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_user", "demo_ds_${0..1}.t_user_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","t_user_${user_id % 2}"));
+        return result;
+    }
+
+    private EncryptRuleConfiguration getEncryptRuleConfiguration() {
+        Properties props = new Properties();
+        props.setProperty("aes.key.value", "123456");
+        EncryptorRuleConfiguration encryptorAES = new EncryptorRuleConfiguration("AES", props);
+        EncryptorRuleConfiguration encryptorMD5 = new EncryptorRuleConfiguration("MD5",new Properties());
+        Map<String, EncryptColumnRuleConfiguration> columns = new HashMap<>();
+        EncryptColumnRuleConfiguration columnUserName = new EncryptColumnRuleConfiguration("user_name", "user_name_cipher", "", "aes");
+        EncryptColumnRuleConfiguration columnPwd = new EncryptColumnRuleConfiguration("pwd_plain", "pwd_cipher", "", "md5");
+        columns.put("user_name",columnUserName);
+        columns.put("pwd",columnPwd);
+        EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration(columns);
+        EncryptRuleConfiguration result = new EncryptRuleConfiguration();
+        result.getEncryptors().put("aes", encryptorAES);
+        result.getEncryptors().put("md5",encryptorMD5);
+        result.getTables().put("t_user", tableConfig);
+        return result;
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_0", DataSourceUtil.createDataSource("demo_ds_0", DatabaseType.MYSQL));
+        result.put("demo_ds_1", DataSourceUtil.createDataSource("demo_ds_1", DatabaseType.MYSQL));
+        return result;
+    }
+
+    private RegistryCenterConfiguration getRegistryCenterConfiguration() {
+        RegistryCenterConfiguration regConfig = new RegistryCenterConfiguration("zookeeper");
+        regConfig.setServerLists("localhost:2181");
+        regConfig.setNamespace("orchestration-raw-jdbc-mysql");
+        return regConfig;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveConfiguration.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveConfiguration.java
new file mode 100644
index 0000000..487a50f
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveConfiguration.java
@@ -0,0 +1,87 @@
+package org.apache.shardingsphere.example.config;
+
+import com.google.common.collect.Lists;
+import org.apache.shardingsphere.api.config.masterslave.MasterSlaveRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.KeyGeneratorConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.StandardShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.algorithm.PreciseModuloShardingDatabaseAlgorithm;
+import org.apache.shardingsphere.example.algorithm.PreciseModuloShardingTableAlgorithm;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.orchestration.config.OrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.reg.api.RegistryCenterConfiguration;
+import org.apache.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.OrchestrationShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.*;
+
+public class ShardingMasterSlaveConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderTableRuleConfiguration());
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderItemTableRuleConfiguration());
+        shardingRuleConfig.getBindingTableGroups().add("t_order, t_order_item");
+        shardingRuleConfig.getBroadcastTables().add("t_address");
+        shardingRuleConfig.setDefaultDatabaseShardingStrategyConfig(new StandardShardingStrategyConfiguration("user_id", new PreciseModuloShardingDatabaseAlgorithm()));
+        shardingRuleConfig.setDefaultTableShardingStrategyConfig(new StandardShardingStrategyConfiguration("order_id", new PreciseModuloShardingTableAlgorithm()));
+        shardingRuleConfig.setMasterSlaveRuleConfigs(getMasterSlaveRuleConfigurations());
+        return OrchestrationShardingDataSourceFactory.createDataSource(
+                createDataSourceMap()
+                , shardingRuleConfig
+                , new Properties()
+                ,new OrchestrationConfiguration("orchestration-mysql-sharding-MS",getRegistryCenterConfiguration(),true));
+    }
+
+    private static TableRuleConfiguration getOrderTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order", "ds_${0..1}.t_order_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","ds_${user_id%2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_${order_id%2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_id", getProperties()));
+        return result;
+    }
+
+    private static TableRuleConfiguration getOrderItemTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order_item", "ds_${0..1}.t_order_item_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","ds_${user_id%2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_item_${order_id%2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_item_id", getProperties()));
+        return result;
+    }
+
+    private static List<MasterSlaveRuleConfiguration> getMasterSlaveRuleConfigurations() {
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig1 = new MasterSlaveRuleConfiguration("ds_0", "demo_ds_master_0", Arrays.asList("demo_ds_master_0_slave_0", "demo_ds_master_0_slave_1"));
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig2 = new MasterSlaveRuleConfiguration("ds_1", "demo_ds_master_1", Arrays.asList("demo_ds_master_1_slave_0", "demo_ds_master_1_slave_1"));
+        return Lists.newArrayList(masterSlaveRuleConfig1, masterSlaveRuleConfig2);
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        final Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_master_0", DataSourceUtil.createDataSource("demo_ds_master_0", DatabaseType.MYSQL));
+        result.put("demo_ds_master_0_slave_0", DataSourceUtil.createDataSource("demo_ds_master_0_slave_0", DatabaseType.MYSQL));
+        result.put("demo_ds_master_0_slave_1", DataSourceUtil.createDataSource("demo_ds_master_0_slave_1", DatabaseType.MYSQL));
+        result.put("demo_ds_master_1", DataSourceUtil.createDataSource("demo_ds_master_1", DatabaseType.MYSQL));
+        result.put("demo_ds_master_1_slave_0", DataSourceUtil.createDataSource("demo_ds_master_1_slave_0", DatabaseType.MYSQL));
+        result.put("demo_ds_master_1_slave_1", DataSourceUtil.createDataSource("demo_ds_master_1_slave_1", DatabaseType.MYSQL));
+        return result;
+    }
+
+    private RegistryCenterConfiguration getRegistryCenterConfiguration() {
+        RegistryCenterConfiguration regConfig = new RegistryCenterConfiguration("zookeeper");
+        regConfig.setServerLists("localhost:2181");
+        regConfig.setNamespace("orchestration-raw-jdbc-mysql");
+        return regConfig;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveEncryptConfiguration.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveEncryptConfiguration.java
new file mode 100644
index 0000000..0bb420e
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveEncryptConfiguration.java
@@ -0,0 +1,91 @@
+package org.apache.shardingsphere.example.config;
+
+import com.google.common.collect.Lists;
+import org.apache.shardingsphere.api.config.encrypt.EncryptColumnRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptTableRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptorRuleConfiguration;
+import org.apache.shardingsphere.api.config.masterslave.MasterSlaveRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.orchestration.config.OrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.reg.api.RegistryCenterConfiguration;
+import org.apache.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.OrchestrationShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.*;
+
+public class ShardingMasterSlaveEncryptConfiguration implements ExampleConfiguration{
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getTableRuleConfiguration());
+        shardingRuleConfig.setMasterSlaveRuleConfigs(getMasterSlaveRuleConfigurations());
+        shardingRuleConfig.setEncryptRuleConfig(getEncryptRuleConfiguration());
+        return OrchestrationShardingDataSourceFactory.createDataSource(
+                createDataSourceMap()
+                , shardingRuleConfig
+                , new Properties()
+                ,new OrchestrationConfiguration("orchestration-mysql-sharding-MS-encrypt",getRegistryCenterConfiguration(),true));
+    }
+
+    private static TableRuleConfiguration getTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_user", "ds_${0..1}.t_user_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","t_user_${user_id % 2}"));
+        return result;
+    }
+
+    private static List<MasterSlaveRuleConfiguration> getMasterSlaveRuleConfigurations() {
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig1 = new MasterSlaveRuleConfiguration("ds_0", "demo_ds_master_0", Arrays.asList("demo_ds_master_0_slave_0", "demo_ds_master_0_slave_1"));
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig2 = new MasterSlaveRuleConfiguration("ds_1", "demo_ds_master_1", Arrays.asList("demo_ds_master_1_slave_0", "demo_ds_master_1_slave_1"));
+        return Lists.newArrayList(masterSlaveRuleConfig1, masterSlaveRuleConfig2);
+    }
+
+    private EncryptRuleConfiguration getEncryptRuleConfiguration() {
+        Properties props = new Properties();
+        props.setProperty("aes.key.value", "123456");
+        EncryptorRuleConfiguration encryptorAES = new EncryptorRuleConfiguration("AES", props);
+        EncryptorRuleConfiguration encryptorMD5 = new EncryptorRuleConfiguration("MD5",new Properties());
+        Map<String, EncryptColumnRuleConfiguration> columns = new HashMap<>();
+        EncryptColumnRuleConfiguration columnUserName = new EncryptColumnRuleConfiguration("user_name", "user_name_cipher", "", "aes");
+        EncryptColumnRuleConfiguration columnPwd = new EncryptColumnRuleConfiguration("pwd_plain", "pwd_cipher", "", "md5");
+        columns.put("user_name",columnUserName);
+        columns.put("pwd",columnPwd);
+        EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration(columns);
+        EncryptRuleConfiguration result = new EncryptRuleConfiguration();
+        result.getEncryptors().put("aes", encryptorAES);
+        result.getEncryptors().put("md5",encryptorMD5);
+        result.getTables().put("t_user", tableConfig);
+        return result;
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        final Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_master_0", DataSourceUtil.createDataSource("demo_ds_master_0", DatabaseType.MYSQL));
+        result.put("demo_ds_master_0_slave_0", DataSourceUtil.createDataSource("demo_ds_master_0_slave_0", DatabaseType.MYSQL));
+        result.put("demo_ds_master_0_slave_1", DataSourceUtil.createDataSource("demo_ds_master_0_slave_1", DatabaseType.MYSQL));
+        result.put("demo_ds_master_1", DataSourceUtil.createDataSource("demo_ds_master_1", DatabaseType.MYSQL));
+        result.put("demo_ds_master_1_slave_0", DataSourceUtil.createDataSource("demo_ds_master_1_slave_0", DatabaseType.MYSQL));
+        result.put("demo_ds_master_1_slave_1", DataSourceUtil.createDataSource("demo_ds_master_1_slave_1", DatabaseType.MYSQL));
+        return result;
+    }
+
+    private RegistryCenterConfiguration getRegistryCenterConfiguration() {
+        RegistryCenterConfiguration regConfig = new RegistryCenterConfiguration("zookeeper");
+        regConfig.setServerLists("localhost:2181");
+        regConfig.setNamespace("orchestration-raw-jdbc-mysql");
+        return regConfig;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
new file mode 100644
index 0000000..b9f1134
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.factory;
+
+import org.apache.shardingsphere.example.config.*;
+import org.apache.shardingsphere.example.type.ShardingType;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class DataSourceFactory {
+    
+    public static DataSource newInstance(final ShardingType shardingType) throws SQLException {
+        switch (shardingType) {
+            case SHARDING_ENCRYPT:
+                return new ShardingEncryptConfiguration().getDataSource();
+            case SHARDING_DATABASES_AND_TABLES:
+                return new ShardingConfiguration().getDataSource();
+            case MASTER_SLAVE:
+                return new MasterSlaveConfiguration().getDataSource();
+            case SHARDING_MASTER_SLAVE:
+                return new ShardingMasterSlaveConfiguration().getDataSource();
+            case SHARDING_MASTER_SLAVE_ENCRYPT:
+                return new ShardingMasterSlaveEncryptConfiguration().getDataSource();
+            case ENCRYPT:
+                return new EncryptConfiguration().getDataSource();
+            default:
+                throw new UnsupportedOperationException(shardingType.name());
+        }
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/YamlDataSourceFactory.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/YamlDataSourceFactory.java
new file mode 100644
index 0000000..0712235
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/YamlDataSourceFactory.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.factory;
+
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.apache.shardingsphere.shardingjdbc.api.yaml.YamlEncryptDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.api.yaml.YamlMasterSlaveDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.api.yaml.YamlShardingDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.yaml.YamlOrchestrationEncryptDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.yaml.YamlOrchestrationMasterSlaveDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.yaml.YamlOrchestrationShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.io.File;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class YamlDataSourceFactory {
+    
+    public static DataSource newInstance(final ShardingType shardingType) throws SQLException, IOException {
+        switch (shardingType) {
+            case SHARDING_DATABASES:
+                return YamlOrchestrationShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-databases.yaml"));
+            case SHARDING_TABLES:
+                return YamlOrchestrationShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-tables.yaml"));
+            case SHARDING_DATABASES_AND_TABLES:
+                return YamlOrchestrationShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-databases-tables.yaml"));
+            case ENCRYPT:
+                return YamlOrchestrationEncryptDataSourceFactory.createDataSource(getFile("/META-INF/encrypt-only.yaml"));
+            case SHARDING_ENCRYPT:
+                return YamlOrchestrationShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-encrypt.yaml"));
+            case MASTER_SLAVE:
+                return YamlOrchestrationMasterSlaveDataSourceFactory.createDataSource(getFile("/META-INF/master-slave.yaml"));
+            case SHARDING_MASTER_SLAVE:
+                return YamlOrchestrationShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-master-slave.yaml"));
+            case SHARDING_MASTER_SLAVE_ENCRYPT:
+                return YamlOrchestrationShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-master-slave-encrypt.yaml"));
+            default:
+                throw new UnsupportedOperationException(shardingType.name());
+        }
+    }
+    
+    private static File getFile(final String fileName) {
+        return new File(Thread.currentThread().getClass().getResource(fileName).getFile());
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/encrypt-only.yaml b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/encrypt-only.yaml
new file mode 100644
index 0000000..97058ac
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/encrypt-only.yaml
@@ -0,0 +1,51 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSource: !!com.zaxxer.hikari.HikariDataSource
+  driverClassName: com.mysql.jdbc.Driver
+  jdbcUrl: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false
+  username: root
+  password:
+
+encryptRule:
+  encryptors:
+    encryptor_aes:
+      type: aes
+      props:
+        aes.key.value: 123456abc
+    encryptor_md5:
+      type: md5
+  tables:
+    t_user:
+      columns:
+        user_name:
+          plainColumn: user_name
+          cipherColumn: user_name_cipher
+          encryptor: encryptor_aes
+        pwd:
+          plainColumn: pwd_plain
+          cipherColumn: pwd_cipher
+          encryptor: encryptor_md5
+
+orchestration:
+  name: orchestration-mysql-yaml-encrypt
+  overwrite: true
+  registry:
+    type: zookeeper
+    serverLists: localhost:2181
+    namespace: orchestration-raw-jdbc-mysql
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/master-slave.yaml b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/master-slave.yaml
new file mode 100644
index 0000000..1db1148
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/master-slave.yaml
@@ -0,0 +1,49 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_master: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master?useUnicode=true&characterEncoding=utf-8
+    username: root
+    password:
+  ds_slave0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_slave_0?useUnicode=true&characterEncoding=utf-8
+    username: root
+    password:
+  ds_slave1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_slave_1?useUnicode=true&characterEncoding=utf-8
+    username: root
+    password:
+
+masterSlaveRule:
+  name: ds_ms
+  masterDataSourceName: ds_master
+  slaveDataSourceNames:
+    - ds_slave0
+    - ds_slave1
+
+orchestration:
+  name: orchestration-mysql-yaml-MS
+  overwrite: true
+  registry:
+    type: zookeeper
+    serverLists: localhost:2181
+    namespace: orchestration-raw-jdbc-mysql
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-databases-tables.yaml b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-databases-tables.yaml
new file mode 100644
index 0000000..24a8d05
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-databases-tables.yaml
@@ -0,0 +1,75 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+
+shardingRule:
+  tables:
+    t_order: 
+      actualDataNodes: ds_${0..1}.t_order_${0..1}
+      tableStrategy: 
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+        props:
+          worker.id: 123        
+    t_order_item:
+      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+        props:
+          worker.id: 123        
+  bindingTables:
+    - t_order,t_order_item
+  broadcastTables:
+    - t_address
+  defaultDatabaseStrategy:
+    inline:
+      shardingColumn: user_id
+      algorithmExpression: ds_${user_id % 2}
+  defaultTableStrategy:
+    none:
+
+props:
+  sql.show: false
+
+orchestration:
+  name: orchestration-mysql-yaml-sharding
+  overwrite: true
+  registry:
+    type: zookeeper
+    serverLists: localhost:2181
+    namespace: orchestration-raw-jdbc-mysql
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-encrypt.yaml b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-encrypt.yaml
new file mode 100644
index 0000000..2934a66
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-encrypt.yaml
@@ -0,0 +1,59 @@
+dataSources:
+  ds_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
+
+orchestration:
+  name: orchestration-mysql-yaml-sharding-encrypt
+  overwrite: true
+  registry:
+    type: zookeeper
+    serverLists: localhost:2181
+    namespace: orchestration-raw-jdbc-mysql
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-master-slave-encrypt.yaml b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-master-slave-encrypt.yaml
new file mode 100644
index 0000000..cd4a8d2
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-master-slave-encrypt.yaml
@@ -0,0 +1,111 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_master_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_0_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_0_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_1_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_1_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
+
+  masterSlaveRules:
+    ds_0:
+      masterDataSourceName: ds_master_0
+      slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ds_1:
+      masterDataSourceName: ds_master_1
+      slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+
+props:
+  sql.show: false
+
+orchestration:
+  name: orchestration-mysql-yaml-sharding-MS-encrypt
+  overwrite: true
+  registry:
+    type: zookeeper
+    serverLists: localhost:2181
+    namespace: orchestration-raw-jdbc-mysql
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-master-slave.yaml b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-master-slave.yaml
new file mode 100644
index 0000000..e6493b7
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-master-slave.yaml
@@ -0,0 +1,102 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_master_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_0_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_0_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_1_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_1_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+    
+shardingRule:
+  tables:
+    t_order: 
+      actualDataNodes: ds_${0..1}.t_order_${0..1}
+      tableStrategy: 
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+        props:
+          worker.id: 123        
+    t_order_item:
+      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+        props:
+          worker.id: 123        
+  bindingTables:
+    - t_order,t_order_item
+  broadcastTables:
+    - t_address
+  defaultDatabaseStrategy:
+    inline:
+      shardingColumn: user_id
+      algorithmExpression: ds_${user_id % 2}
+  masterSlaveRules:
+    ds_0:
+      masterDataSourceName: ds_master_0
+      slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ds_1:
+      masterDataSourceName: ds_master_1
+      slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+  
+props:
+  sql.show: false
+
+orchestration:
+  name: orchestration-mysql-yaml-sharding-MS
+  overwrite: true
+  registry:
+    type: zookeeper
+    serverLists: localhost:2181
+    namespace: orchestration-raw-jdbc-mysql
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/pom.xml b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/pom.xml
new file mode 100644
index 0000000..aa8c124
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/pom.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>orchestration-example</artifactId>
+    <version>4.0.0-RC4-SNAPSHOT</version>
+  </parent>
+  <groupId>org.apache.shardingsphere.example</groupId>
+  <artifactId>orchestration-raw-jdbc-postgresql-example</artifactId>
+
+  <name>AcceptanceTest::orchestration::postgresql::raw-jdbc</name>
+  <!-- FIXME change it to the project's website -->
+  <url>http://www.example.com</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.11</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>config-utility</artifactId>
+      <version>${project.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>example-api</artifactId>
+      <version>${project.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>example-raw-jdbc</artifactId>
+      <version>${project.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere</groupId>
+      <artifactId>sharding-orchestration-reg-api</artifactId>
+      <version>${shardingsphere.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere</groupId>
+      <artifactId>sharding-jdbc-orchestration</artifactId>
+      <version>${shardingsphere.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere</groupId>
+      <artifactId>sharding-orchestration-reg-zookeeper-curator</artifactId>
+      <version>${shardingsphere.version}</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+      <plugins>
+        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+        <plugin>
+          <artifactId>maven-clean-plugin</artifactId>
+          <version>3.1.0</version>
+        </plugin>
+        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+        <plugin>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.8.0</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.22.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-install-plugin</artifactId>
+          <version>2.5.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <version>2.8.2</version>
+        </plugin>
+        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+        <plugin>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.7.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-project-info-reports-plugin</artifactId>
+          <version>3.0.0</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
new file mode 100644
index 0000000..ecfc8d4
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
new file mode 100644
index 0000000..120f687
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaMasterSlaveTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
new file mode 100644
index 0000000..83ffa23
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
new file mode 100644
index 0000000..996f48e
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlave {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
new file mode 100644
index 0000000..9330b8f
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlaveEncrypt {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaveEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
new file mode 100644
index 0000000..25d9ed9
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingTest {
+     @Test
+    public void assertCommonService() throws SQLException {
+         DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_DATABASES_AND_TABLES);
+         ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+         ExampleExecuteTemplate.run(exampleService);
+         RawJdbcAssertUtils.assertShardingTableDatabases(exampleService);
+     }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlEncryptTest.java
new file mode 100644
index 0000000..e18c5b2
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlMasterSlaveTest.java
new file mode 100644
index 0000000..e3ff376
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlMasterSlaveTest.java
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlMasterSlaveTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingEncryptTest.java
new file mode 100644
index 0000000..486d20e
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..691e586
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingMasterSlaveEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaveEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveTest.java
new file mode 100644
index 0000000..f614feb
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveTest.java
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingMasterSlaveTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingTest.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingTest.java
new file mode 100644
index 0000000..ddce9cd
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingTest.java
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_DATABASES_AND_TABLES);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingTableDatabases(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/EncryptConfiguration.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/EncryptConfiguration.java
new file mode 100644
index 0000000..9e5c2d6
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/EncryptConfiguration.java
@@ -0,0 +1,53 @@
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.encrypt.EncryptColumnRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptTableRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptorRuleConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.orchestration.config.OrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.reg.api.RegistryCenterConfiguration;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.OrchestrationEncryptDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class EncryptConfiguration implements ExampleConfiguration {
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        return OrchestrationEncryptDataSourceFactory.createDataSource(
+                DataSourceUtil.createDataSource("demo_ds", DatabaseType.POSTGRESQL),
+                getEncryptRuleConfiguration(),
+                new Properties(),
+                new OrchestrationConfiguration("orchestration-postgresql-encrypt", getRegistryCenterConfiguration(), true));
+    }
+
+    private EncryptRuleConfiguration getEncryptRuleConfiguration() {
+        Properties props = new Properties();
+        props.setProperty("aes.key.value", "123456");
+        EncryptorRuleConfiguration encryptorAES = new EncryptorRuleConfiguration("AES", props);
+        EncryptorRuleConfiguration encryptorMD5 = new EncryptorRuleConfiguration("MD5",new Properties());
+        Map<String, EncryptColumnRuleConfiguration> columns = new HashMap<>();
+        EncryptColumnRuleConfiguration columnUserName = new EncryptColumnRuleConfiguration("user_name", "user_name_cipher", "", "aes");
+        EncryptColumnRuleConfiguration columnPwd = new EncryptColumnRuleConfiguration("pwd_plain", "pwd_cipher", "", "md5");
+        columns.put("user_name",columnUserName);
+        columns.put("pwd",columnPwd);
+        EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration(columns);
+        EncryptRuleConfiguration result = new EncryptRuleConfiguration();
+        result.getEncryptors().put("aes", encryptorAES);
+        result.getEncryptors().put("md5",encryptorMD5);
+        result.getTables().put("t_user", tableConfig);
+        return result;
+    }
+    private RegistryCenterConfiguration getRegistryCenterConfiguration() {
+        RegistryCenterConfiguration regConfig = new RegistryCenterConfiguration("zookeeper");
+        regConfig.setServerLists("localhost:2181");
+        regConfig.setNamespace("orchestration-raw-jdbc-postgresql");
+        return regConfig;
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/MasterSlaveConfiguration.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/MasterSlaveConfiguration.java
new file mode 100644
index 0000000..983a1e7
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/MasterSlaveConfiguration.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.masterslave.MasterSlaveRuleConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.orchestration.config.OrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.reg.api.RegistryCenterConfiguration;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.OrchestrationMasterSlaveDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public final class MasterSlaveConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig = new MasterSlaveRuleConfiguration("demo_ds_master_slave", "demo_ds_master", Arrays.asList("demo_ds_slave_0", "demo_ds_slave_1"));
+        return OrchestrationMasterSlaveDataSourceFactory.createDataSource(
+                createDataSourceMap(),
+                masterSlaveRuleConfig,
+                new Properties(),
+                new OrchestrationConfiguration("orchestration-postgresql-master-slave",getRegistryCenterConfiguration(),true));
+    }
+    
+    private Map<String, DataSource> createDataSourceMap() {
+        Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_master", DataSourceUtil.createDataSource("demo_ds_master", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_slave_0", DataSourceUtil.createDataSource("demo_ds_slave_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_slave_1", DataSourceUtil.createDataSource("demo_ds_slave_1", DatabaseType.POSTGRESQL));
+        return result;
+    }
+    private RegistryCenterConfiguration getRegistryCenterConfiguration() {
+        RegistryCenterConfiguration regConfig = new RegistryCenterConfiguration("zookeeper");
+        regConfig.setServerLists("localhost:2181");
+        regConfig.setNamespace("orchestration-raw-jdbc-postgresql");
+        return regConfig;
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingConfiguration.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingConfiguration.java
new file mode 100644
index 0000000..695b4a5
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingConfiguration.java
@@ -0,0 +1,74 @@
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.sharding.KeyGeneratorConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.StandardShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.algorithm.PreciseModuloShardingTableAlgorithm;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.orchestration.config.OrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.reg.api.RegistryCenterConfiguration;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.OrchestrationShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class ShardingConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderTableRuleConfiguration());
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderItemTableRuleConfiguration());
+        shardingRuleConfig.getBindingTableGroups().add("t_order, t_order_item");
+        shardingRuleConfig.getBroadcastTables().add("t_address");
+        shardingRuleConfig.setDefaultDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        shardingRuleConfig.setDefaultTableShardingStrategyConfig(new StandardShardingStrategyConfiguration("order_id", new PreciseModuloShardingTableAlgorithm()));
+        return OrchestrationShardingDataSourceFactory.createDataSource(
+                createDataSourceMap()
+                , shardingRuleConfig
+                , new Properties()
+                ,new OrchestrationConfiguration("orchestration-postgresql-sharding",getRegistryCenterConfiguration(),true));
+    }
+
+    private static TableRuleConfiguration getOrderTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order", "demo_ds_${0..1}.t_order_${0..1}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_${order_id % 2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_id", getProperties()));
+        return result;
+    }
+
+    private static TableRuleConfiguration getOrderItemTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order_item", "demo_ds_${0..1}.t_order_item_${0..1}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_item_${order_id % 2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_item_id", getProperties()));
+        return result;
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_0", DataSourceUtil.createDataSource("demo_ds_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_1", DataSourceUtil.createDataSource("demo_ds_1", DatabaseType.POSTGRESQL));
+        return result;
+    }
+
+    private RegistryCenterConfiguration getRegistryCenterConfiguration() {
+        RegistryCenterConfiguration regConfig = new RegistryCenterConfiguration("zookeeper");
+        regConfig.setServerLists("localhost:2181");
+        regConfig.setNamespace("orchestration-raw-jdbc-postgresql");
+        return regConfig;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingEncryptConfiguration.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingEncryptConfiguration.java
new file mode 100644
index 0000000..cff495e
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingEncryptConfiguration.java
@@ -0,0 +1,80 @@
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.encrypt.EncryptColumnRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptTableRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptorRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.orchestration.config.OrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.reg.api.RegistryCenterConfiguration;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.OrchestrationShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class ShardingEncryptConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getTableRuleConfiguration());
+        shardingRuleConfig.setEncryptRuleConfig(getEncryptRuleConfiguration());
+        return OrchestrationShardingDataSourceFactory.createDataSource(
+                createDataSourceMap()
+                , shardingRuleConfig
+                , new Properties()
+                ,new OrchestrationConfiguration("orchestration-postgresql-sharding-encrypt",getRegistryCenterConfiguration(),true));
+    }
+
+    private static TableRuleConfiguration getTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_user", "demo_ds_${0..1}.t_user_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","t_user_${user_id % 2}"));
+        return result;
+    }
+
+    private EncryptRuleConfiguration getEncryptRuleConfiguration() {
+        Properties props = new Properties();
+        props.setProperty("aes.key.value", "123456");
+        EncryptorRuleConfiguration encryptorAES = new EncryptorRuleConfiguration("AES", props);
+        EncryptorRuleConfiguration encryptorMD5 = new EncryptorRuleConfiguration("MD5",new Properties());
+        Map<String, EncryptColumnRuleConfiguration> columns = new HashMap<>();
+        EncryptColumnRuleConfiguration columnUserName = new EncryptColumnRuleConfiguration("user_name", "user_name_cipher", "", "aes");
+        EncryptColumnRuleConfiguration columnPwd = new EncryptColumnRuleConfiguration("pwd_plain", "pwd_cipher", "", "md5");
+        columns.put("user_name",columnUserName);
+        columns.put("pwd",columnPwd);
+        EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration(columns);
+        EncryptRuleConfiguration result = new EncryptRuleConfiguration();
+        result.getEncryptors().put("aes", encryptorAES);
+        result.getEncryptors().put("md5",encryptorMD5);
+        result.getTables().put("t_user", tableConfig);
+        return result;
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_0", DataSourceUtil.createDataSource("demo_ds_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_1", DataSourceUtil.createDataSource("demo_ds_1", DatabaseType.POSTGRESQL));
+        return result;
+    }
+
+    private RegistryCenterConfiguration getRegistryCenterConfiguration() {
+        RegistryCenterConfiguration regConfig = new RegistryCenterConfiguration("zookeeper");
+        regConfig.setServerLists("localhost:2181");
+        regConfig.setNamespace("orchestration-raw-jdbc-postgresql");
+        return regConfig;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveConfiguration.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveConfiguration.java
new file mode 100644
index 0000000..81e7f87
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveConfiguration.java
@@ -0,0 +1,86 @@
+package org.apache.shardingsphere.example.config;
+
+import com.google.common.collect.Lists;
+import org.apache.shardingsphere.api.config.masterslave.MasterSlaveRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.KeyGeneratorConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.StandardShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.algorithm.PreciseModuloShardingDatabaseAlgorithm;
+import org.apache.shardingsphere.example.algorithm.PreciseModuloShardingTableAlgorithm;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.orchestration.config.OrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.reg.api.RegistryCenterConfiguration;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.OrchestrationShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.*;
+
+public class ShardingMasterSlaveConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderTableRuleConfiguration());
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderItemTableRuleConfiguration());
+        shardingRuleConfig.getBindingTableGroups().add("t_order, t_order_item");
+        shardingRuleConfig.getBroadcastTables().add("t_address");
+        shardingRuleConfig.setDefaultDatabaseShardingStrategyConfig(new StandardShardingStrategyConfiguration("user_id", new PreciseModuloShardingDatabaseAlgorithm()));
+        shardingRuleConfig.setDefaultTableShardingStrategyConfig(new StandardShardingStrategyConfiguration("order_id", new PreciseModuloShardingTableAlgorithm()));
+        shardingRuleConfig.setMasterSlaveRuleConfigs(getMasterSlaveRuleConfigurations());
+        return OrchestrationShardingDataSourceFactory.createDataSource(
+                createDataSourceMap()
+                , shardingRuleConfig
+                , new Properties()
+                ,new OrchestrationConfiguration("orchestration-postgresql-sharding-MS",getRegistryCenterConfiguration(),true));
+    }
+
+    private static TableRuleConfiguration getOrderTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order", "ds_${0..1}.t_order_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","ds_${user_id%2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_${order_id%2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_id", getProperties()));
+        return result;
+    }
+
+    private static TableRuleConfiguration getOrderItemTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order_item", "ds_${0..1}.t_order_item_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","ds_${user_id%2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_item_${order_id%2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_item_id", getProperties()));
+        return result;
+    }
+
+    private static List<MasterSlaveRuleConfiguration> getMasterSlaveRuleConfigurations() {
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig1 = new MasterSlaveRuleConfiguration("ds_0", "demo_ds_master_0", Arrays.asList("demo_ds_master_0_slave_0", "demo_ds_master_0_slave_1"));
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig2 = new MasterSlaveRuleConfiguration("ds_1", "demo_ds_master_1", Arrays.asList("demo_ds_master_1_slave_0", "demo_ds_master_1_slave_1"));
+        return Lists.newArrayList(masterSlaveRuleConfig1, masterSlaveRuleConfig2);
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        final Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_master_0", DataSourceUtil.createDataSource("demo_ds_master_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_0_slave_0", DataSourceUtil.createDataSource("demo_ds_master_0_slave_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_0_slave_1", DataSourceUtil.createDataSource("demo_ds_master_0_slave_1", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_1", DataSourceUtil.createDataSource("demo_ds_master_1", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_1_slave_0", DataSourceUtil.createDataSource("demo_ds_master_1_slave_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_1_slave_1", DataSourceUtil.createDataSource("demo_ds_master_1_slave_1", DatabaseType.POSTGRESQL));
+        return result;
+    }
+
+    private RegistryCenterConfiguration getRegistryCenterConfiguration() {
+        RegistryCenterConfiguration regConfig = new RegistryCenterConfiguration("zookeeper");
+        regConfig.setServerLists("localhost:2181");
+        regConfig.setNamespace("orchestration-raw-jdbc-postgresql");
+        return regConfig;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveEncryptConfiguration.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveEncryptConfiguration.java
new file mode 100644
index 0000000..4aa2347
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveEncryptConfiguration.java
@@ -0,0 +1,90 @@
+package org.apache.shardingsphere.example.config;
+
+import com.google.common.collect.Lists;
+import org.apache.shardingsphere.api.config.encrypt.EncryptColumnRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptTableRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptorRuleConfiguration;
+import org.apache.shardingsphere.api.config.masterslave.MasterSlaveRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.orchestration.config.OrchestrationConfiguration;
+import org.apache.shardingsphere.orchestration.reg.api.RegistryCenterConfiguration;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.OrchestrationShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.*;
+
+public class ShardingMasterSlaveEncryptConfiguration implements ExampleConfiguration{
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getTableRuleConfiguration());
+        shardingRuleConfig.setMasterSlaveRuleConfigs(getMasterSlaveRuleConfigurations());
+        shardingRuleConfig.setEncryptRuleConfig(getEncryptRuleConfiguration());
+        return OrchestrationShardingDataSourceFactory.createDataSource(
+                createDataSourceMap()
+                , shardingRuleConfig
+                , new Properties()
+                ,new OrchestrationConfiguration("orchestration-postgresql-sharding-MS-encrypt",getRegistryCenterConfiguration(),true));
+    }
+
+    private static TableRuleConfiguration getTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_user", "ds_${0..1}.t_user_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","t_user_${user_id % 2}"));
+        return result;
+    }
+
+    private static List<MasterSlaveRuleConfiguration> getMasterSlaveRuleConfigurations() {
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig1 = new MasterSlaveRuleConfiguration("ds_0", "demo_ds_master_0", Arrays.asList("demo_ds_master_0_slave_0", "demo_ds_master_0_slave_1"));
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig2 = new MasterSlaveRuleConfiguration("ds_1", "demo_ds_master_1", Arrays.asList("demo_ds_master_1_slave_0", "demo_ds_master_1_slave_1"));
+        return Lists.newArrayList(masterSlaveRuleConfig1, masterSlaveRuleConfig2);
+    }
+
+    private EncryptRuleConfiguration getEncryptRuleConfiguration() {
+        Properties props = new Properties();
+        props.setProperty("aes.key.value", "123456");
+        EncryptorRuleConfiguration encryptorAES = new EncryptorRuleConfiguration("AES", props);
+        EncryptorRuleConfiguration encryptorMD5 = new EncryptorRuleConfiguration("MD5",new Properties());
+        Map<String, EncryptColumnRuleConfiguration> columns = new HashMap<>();
+        EncryptColumnRuleConfiguration columnUserName = new EncryptColumnRuleConfiguration("user_name", "user_name_cipher", "", "aes");
+        EncryptColumnRuleConfiguration columnPwd = new EncryptColumnRuleConfiguration("pwd_plain", "pwd_cipher", "", "md5");
+        columns.put("user_name",columnUserName);
+        columns.put("pwd",columnPwd);
+        EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration(columns);
+        EncryptRuleConfiguration result = new EncryptRuleConfiguration();
+        result.getEncryptors().put("aes", encryptorAES);
+        result.getEncryptors().put("md5",encryptorMD5);
+        result.getTables().put("t_user", tableConfig);
+        return result;
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        final Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_master_0", DataSourceUtil.createDataSource("demo_ds_master_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_0_slave_0", DataSourceUtil.createDataSource("demo_ds_master_0_slave_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_0_slave_1", DataSourceUtil.createDataSource("demo_ds_master_0_slave_1", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_1", DataSourceUtil.createDataSource("demo_ds_master_1", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_1_slave_0", DataSourceUtil.createDataSource("demo_ds_master_1_slave_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_1_slave_1", DataSourceUtil.createDataSource("demo_ds_master_1_slave_1", DatabaseType.POSTGRESQL));
+        return result;
+    }
+
+    private RegistryCenterConfiguration getRegistryCenterConfiguration() {
+        RegistryCenterConfiguration regConfig = new RegistryCenterConfiguration("zookeeper");
+        regConfig.setServerLists("localhost:2181");
+        regConfig.setNamespace("orchestration-raw-jdbc-postgresql");
+        return regConfig;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
new file mode 100644
index 0000000..b9f1134
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.factory;
+
+import org.apache.shardingsphere.example.config.*;
+import org.apache.shardingsphere.example.type.ShardingType;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class DataSourceFactory {
+    
+    public static DataSource newInstance(final ShardingType shardingType) throws SQLException {
+        switch (shardingType) {
+            case SHARDING_ENCRYPT:
+                return new ShardingEncryptConfiguration().getDataSource();
+            case SHARDING_DATABASES_AND_TABLES:
+                return new ShardingConfiguration().getDataSource();
+            case MASTER_SLAVE:
+                return new MasterSlaveConfiguration().getDataSource();
+            case SHARDING_MASTER_SLAVE:
+                return new ShardingMasterSlaveConfiguration().getDataSource();
+            case SHARDING_MASTER_SLAVE_ENCRYPT:
+                return new ShardingMasterSlaveEncryptConfiguration().getDataSource();
+            case ENCRYPT:
+                return new EncryptConfiguration().getDataSource();
+            default:
+                throw new UnsupportedOperationException(shardingType.name());
+        }
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/YamlDataSourceFactory.java b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/YamlDataSourceFactory.java
new file mode 100644
index 0000000..aaf0cbf
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/YamlDataSourceFactory.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.factory;
+
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.yaml.YamlOrchestrationEncryptDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.yaml.YamlOrchestrationMasterSlaveDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.orchestration.api.yaml.YamlOrchestrationShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.io.File;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class YamlDataSourceFactory {
+    
+    public static DataSource newInstance(final ShardingType shardingType) throws SQLException, IOException {
+        switch (shardingType) {
+            case SHARDING_DATABASES:
+                return YamlOrchestrationShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-databases.yaml"));
+            case SHARDING_TABLES:
+                return YamlOrchestrationShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-tables.yaml"));
+            case SHARDING_DATABASES_AND_TABLES:
+                return YamlOrchestrationShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-databases-tables.yaml"));
+            case ENCRYPT:
+                return YamlOrchestrationEncryptDataSourceFactory.createDataSource(getFile("/META-INF/encrypt-only.yaml"));
+            case SHARDING_ENCRYPT:
+                return YamlOrchestrationShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-encrypt.yaml"));
+            case MASTER_SLAVE:
+                return YamlOrchestrationMasterSlaveDataSourceFactory.createDataSource(getFile("/META-INF/master-slave.yaml"));
+            case SHARDING_MASTER_SLAVE:
+                return YamlOrchestrationShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-master-slave.yaml"));
+            case SHARDING_MASTER_SLAVE_ENCRYPT:
+                return YamlOrchestrationShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-master-slave-encrypt.yaml"));
+            default:
+                throw new UnsupportedOperationException(shardingType.name());
+        }
+    }
+    
+    private static File getFile(final String fileName) {
+        return new File(Thread.currentThread().getClass().getResource(fileName).getFile());
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/encrypt-only.yaml b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/encrypt-only.yaml
new file mode 100644
index 0000000..fc15bbc
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/encrypt-only.yaml
@@ -0,0 +1,51 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSource: !!com.zaxxer.hikari.HikariDataSource
+  driverClassName: org.postgresql.Driver
+  jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds
+  username: postgres
+  password:
+
+encryptRule:
+  encryptors:
+    encryptor_aes:
+      type: aes
+      props:
+        aes.key.value: 123456abc
+    encryptor_md5:
+      type: md5
+  tables:
+    t_user:
+      columns:
+        user_name:
+          plainColumn: user_name
+          cipherColumn: user_name_cipher
+          encryptor: encryptor_aes
+        pwd:
+          plainColumn: pwd_plain
+          cipherColumn: pwd_cipher
+          encryptor: encryptor_md5
+
+orchestration:
+  name: orchestration-postgresql-yaml-encrypt
+  overwrite: true
+  registry:
+    type: zookeeper
+    serverLists: localhost:2181
+    namespace: orchestration-raw-jdbc-postgresql
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/master-slave.yaml b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/master-slave.yaml
new file mode 100644
index 0000000..c25c8db
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/master-slave.yaml
@@ -0,0 +1,49 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_master: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master
+    username: postgres
+    password:
+  ds_slave0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_slave_0
+    username: postgres
+    password:
+  ds_slave1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_slave_1
+    username: postgres
+    password:
+
+masterSlaveRule:
+  name: ds_ms
+  masterDataSourceName: ds_master
+  slaveDataSourceNames:
+    - ds_slave0
+    - ds_slave1
+
+orchestration:
+  name: orchestration-postgresql-yaml-MS
+  overwrite: true
+  registry:
+    type: zookeeper
+    serverLists: localhost:2181
+    namespace: orchestration-raw-jdbc-postgresql
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-databases-tables.yaml b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-databases-tables.yaml
new file mode 100644
index 0000000..dfe064e
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-databases-tables.yaml
@@ -0,0 +1,75 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0
+    username: postgres
+    password:
+  ds_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1
+    username: postgres
+    password:
+
+shardingRule:
+  tables:
+    t_order: 
+      actualDataNodes: ds_${0..1}.t_order_${0..1}
+      tableStrategy: 
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+        props:
+          worker.id: 123        
+    t_order_item:
+      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+        props:
+          worker.id: 123        
+  bindingTables:
+    - t_order,t_order_item
+  broadcastTables:
+    - t_address
+  defaultDatabaseStrategy:
+    inline:
+      shardingColumn: user_id
+      algorithmExpression: ds_${user_id % 2}
+  defaultTableStrategy:
+    none:
+
+props:
+  sql.show: false
+
+orchestration:
+  name: orchestration-postgresql-yaml-sharding
+  overwrite: true
+  registry:
+    type: zookeeper
+    serverLists: localhost:2181
+    namespace: orchestration-raw-jdbc-postgresql
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-encrypt.yaml b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-encrypt.yaml
new file mode 100644
index 0000000..c3dfac5
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-encrypt.yaml
@@ -0,0 +1,59 @@
+dataSources:
+  ds_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0
+    username: postgres
+    password:
+  ds_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1
+    username: postgres
+    password:
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
+
+orchestration:
+  name: orchestration-postgresql-yaml-sharding-encrypt
+  overwrite: true
+  registry:
+    type: zookeeper
+    serverLists: localhost:2181
+    namespace: orchestration-raw-jdbc-postgresql
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-master-slave-encrypt.yaml b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-master-slave-encrypt.yaml
new file mode 100644
index 0000000..674b6b1
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-master-slave-encrypt.yaml
@@ -0,0 +1,111 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_master_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0
+    username: postgres
+    password:
+  ds_master_0_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0
+    username: postgres
+    password:
+  ds_master_0_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1
+    username: postgres
+    password:
+  ds_master_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1
+    username: postgres
+    password:
+  ds_master_1_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0
+    username: postgres
+    password:
+  ds_master_1_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1
+    username: postgres
+    password:
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
+
+  masterSlaveRules:
+    ds_0:
+      masterDataSourceName: ds_master_0
+      slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ds_1:
+      masterDataSourceName: ds_master_1
+      slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+
+props:
+  sql.show: false
+
+orchestration:
+  name: orchestration-postgresql-yaml-sharding-MS-encrypt
+  overwrite: true
+  registry:
+    type: zookeeper
+    serverLists: localhost:2181
+    namespace: orchestration-raw-jdbc-postgresql
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-master-slave.yaml b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-master-slave.yaml
new file mode 100644
index 0000000..cb18fee
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-master-slave.yaml
@@ -0,0 +1,102 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_master_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0
+    username: postgres
+    password:
+  ds_master_0_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0
+    username: postgres
+    password:
+  ds_master_0_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1
+    username: postgres
+    password:
+  ds_master_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1
+    username: postgres
+    password:
+  ds_master_1_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0
+    username: postgres
+    password:
+  ds_master_1_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1
+    username: postgres
+    password:
+    
+shardingRule:
+  tables:
+    t_order: 
+      actualDataNodes: ds_${0..1}.t_order_${0..1}
+      tableStrategy: 
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+        props:
+          worker.id: 123        
+    t_order_item:
+      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+        props:
+          worker.id: 123        
+  bindingTables:
+    - t_order,t_order_item
+  broadcastTables:
+    - t_address
+  defaultDatabaseStrategy:
+    inline:
+      shardingColumn: user_id
+      algorithmExpression: ds_${user_id % 2}
+  masterSlaveRules:
+    ds_0:
+      masterDataSourceName: ds_master_0
+      slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ds_1:
+      masterDataSourceName: ds_master_1
+      slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+  
+props:
+  sql.show: false
+
+orchestration:
+  name: orchestration-postgresql-yaml-sharding-MS
+  overwrite: true
+  registry:
+    type: zookeeper
+    serverLists: localhost:2181
+    namespace: orchestration-raw-jdbc-postgresql
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/pom.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/pom.xml
new file mode 100644
index 0000000..c80ee0e
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/pom.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>orchestration-example</artifactId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <artifactId>orchestration-spring-boot-mysql-example</artifactId>
+    <name>AcceptanceTest::orchestration::mysql::spring-boot</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-spring-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-jdbc-orchestration-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-orchestration-reg-zookeeper-curator</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperEncryptTest.java
new file mode 100644
index 0000000..2c956dc
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-encrypt")
+public class CloudZookeeperEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperMasterSlavesTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperMasterSlavesTest.java
new file mode 100644
index 0000000..f878e8b
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperMasterSlavesTest.java
@@ -0,0 +1,32 @@
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-master-slave")
+public class CloudZookeeperMasterSlavesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingDatabasesTablesTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingDatabasesTablesTest.java
new file mode 100644
index 0000000..6ee9d0b
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingDatabasesTablesTest.java
@@ -0,0 +1,32 @@
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-sharding-databases-tables")
+public class CloudZookeeperShardingDatabasesTablesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingDatabaseAndTableResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingDatabasesTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingDatabasesTest.java
new file mode 100644
index 0000000..5082067
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingDatabasesTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-sharding-databases")
+public class CloudZookeeperShardingDatabasesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingDatabaseResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingEncryptTest.java
new file mode 100644
index 0000000..cc3ecc3
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-sharding-encrypt")
+public class CloudZookeeperShardingEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingMasterSlaveEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..8e66393
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-sharding-master-slave-encrypt")
+public class CloudZookeeperShardingMasterSlaveEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingMasterSlaveTest.java
new file mode 100644
index 0000000..69376e6
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingMasterSlaveTest.java
@@ -0,0 +1,32 @@
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-sharding-master-slave")
+public class CloudZookeeperShardingMasterSlaveTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingTablesTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingTablesTest.java
new file mode 100644
index 0000000..1e54b35
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingTablesTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-sharding-tables")
+public class CloudZookeeperShardingTablesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingTableResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperEncryptTest.java
new file mode 100644
index 0000000..20949fe
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-encrypt")
+public class LocalZookeeperEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperMasterSlaveTest.java
new file mode 100644
index 0000000..99a3679
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperMasterSlaveTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-master-slave")
+public class LocalZookeeperMasterSlaveTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingDatabasesTablesTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingDatabasesTablesTest.java
new file mode 100644
index 0000000..80ae38f
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingDatabasesTablesTest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-sharding-databases-tables")
+public class LocalZookeeperShardingDatabasesTablesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingDatabaseAndTableResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingDatabasesTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingDatabasesTest.java
new file mode 100644
index 0000000..bef3174
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingDatabasesTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-sharding-databases")
+public class LocalZookeeperShardingDatabasesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingDatabaseResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingEncryptTest.java
new file mode 100644
index 0000000..250177a
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-sharding-encrypt")
+public class LocalZookeeperShardingEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingMasterSlaveEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..db6095c
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-sharding-master-slave-encrypt")
+public class LocalZookeeperShardingMasterSlaveEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingMasterSlaveTest.java
new file mode 100644
index 0000000..773c7ed
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingMasterSlaveTest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-sharding-master-slave")
+public class LocalZookeeperShardingMasterSlaveTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingTablesTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingTablesTest.java
new file mode 100644
index 0000000..663873d
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingTablesTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-sharding-tables")
+public class LocalZookeeperShardingTablesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingTableResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/SpringBootWithRegistryCenterTestMain.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/SpringBootWithRegistryCenterTestMain.java
new file mode 100644
index 0000000..6b6a7f7
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/SpringBootWithRegistryCenterTestMain.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
+import org.springframework.context.annotation.ComponentScan;
+
+@ComponentScan("org.apache.shardingsphere.example.core.mybatis")
+@MapperScan(basePackages = "org.apache.shardingsphere.example.core.mybatis.repository")
+@SpringBootApplication(exclude = JtaAutoConfiguration.class)
+public class SpringBootWithRegistryCenterTestMain {
+    
+    public static void main(final String[] args) {
+        SpringApplication.run(SpringBootWithRegistryCenterTestMain.class, args);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/META-INF/mybatis-config.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/META-INF/mybatis-config.xml
new file mode 100644
index 0000000..e450f2f
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/META-INF/mybatis-config.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <mappers>
+        <mapper resource="META-INF/mappers/mysql/AddressMapper.xml"/>
+        <mapper resource="META-INF/mappers/mysql/OrderMapper.xml"/>
+        <mapper resource="META-INF/mappers/mysql/OrderItemMapper.xml"/>
+        <mapper resource="META-INF/mappers/mysql/UserMapper.xml"/>
+    </mappers>
+</configuration>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-encrypt.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-encrypt.properties
new file mode 100644
index 0000000..76d32c5
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-encrypt.properties
@@ -0,0 +1,23 @@
+spring.shardingsphere.datasource.names=ds
+
+spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds.jdbc-url=jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds.username=root
+spring.shardingsphere.datasource.ds.password=
+
+spring.shardingsphere.encrypt.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.encrypt.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.encrypt.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.encryptor=encryptor_md5
+
+spring.shardingsphere.orchestration.name=cloud_encrypt
+spring.shardingsphere.orchestration.overwrite=false
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-cloud
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-master-slave.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-master-slave.properties
new file mode 100644
index 0000000..e2d92bb
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-master-slave.properties
@@ -0,0 +1,30 @@
+spring.shardingsphere.datasource.names=ds_master,ds_slave_0,ds_slave_1
+
+spring.shardingsphere.datasource.ds_master.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master
+spring.shardingsphere.datasource.ds_master.username=root
+spring.shardingsphere.datasource.ds_master.password=
+
+spring.shardingsphere.datasource.ds_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_slave_0
+spring.shardingsphere.datasource.ds_slave_0.username=root
+spring.shardingsphere.datasource.ds_slave_0.password=
+
+spring.shardingsphere.datasource.ds_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_slave_1
+spring.shardingsphere.datasource.ds_slave_1.username=root
+spring.shardingsphere.datasource.ds_slave_1.password=
+
+spring.shardingsphere.masterslave.load-balance-algorithm-type=round_robin
+spring.shardingsphere.masterslave.name=ds_ms
+spring.shardingsphere.masterslave.master-data-source-name=ds_master
+spring.shardingsphere.masterslave.slave-data-source-names=ds_slave_0,ds_slave_1
+
+spring.shardingsphere.orchestration.name=cloud_master_slave
+spring.shardingsphere.orchestration.overwrite=false
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-cloud
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-databases-tables.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-databases-tables.properties
new file mode 100644
index 0000000..f808b18
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-databases-tables.properties
@@ -0,0 +1,42 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_0
+spring.shardingsphere.datasource.ds_0.username=root
+spring.shardingsphere.datasource.ds_0.password=
+spring.shardingsphere.datasource.ds_0.max-active=16
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_1
+spring.shardingsphere.datasource.ds_1.username=root
+spring.shardingsphere.datasource.ds_1.password=
+spring.shardingsphere.datasource.ds_1.max-active=16
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.default-datasource-name=ds_0
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.orchestration.name=cloud_sharding
+spring.shardingsphere.orchestration.overwrite=false
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-cloud
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-databases.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-databases.properties
new file mode 100644
index 0000000..27169a3
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-databases.properties
@@ -0,0 +1,32 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_0.username=root
+spring.shardingsphere.datasource.ds_0.password=
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_1.username=root
+spring.shardingsphere.datasource.ds_1.password=
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.orchestration.name=cloud_sharding_databases
+spring.shardingsphere.orchestration.overwrite=false
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-cloud
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-encrypt.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-encrypt.properties
new file mode 100644
index 0000000..9c7a522
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-encrypt.properties
@@ -0,0 +1,38 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_0.username=root
+spring.shardingsphere.datasource.ds_0.password=
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_1.username=root
+spring.shardingsphere.datasource.ds_1.password=
+
+spring.shardingsphere.sharding.tables.t_user.actual-data-nodes=ds_$->{0..1}.t_user_$->{0..1}
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.algorithm-expression=t_user_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.key-generator.column=user_id
+spring.shardingsphere.sharding.tables.t_user.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_user.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.encryptor=encryptor_md5
+
+spring.shardingsphere.orchestration.name=cloud_sharding_encrypt
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-cloud
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-master-slave-encrypt.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-master-slave-encrypt.properties
new file mode 100644
index 0000000..edddfff
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-master-slave-encrypt.properties
@@ -0,0 +1,65 @@
+spring.shardingsphere.datasource.names=ds_master_0,ds_master_1,ds_master_0_slave_0,ds_master_0_slave_1,ds_master_1_slave_0,ds_master_1_slave_1
+
+spring.shardingsphere.datasource.ds_master_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0.username=root
+spring.shardingsphere.datasource.ds_master_0.password=
+
+spring.shardingsphere.datasource.ds_master_0_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0_slave_0.username=root
+spring.shardingsphere.datasource.ds_master_0_slave_0.password=
+spring.shardingsphere.datasource.ds_master_0_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0_slave_1.username=root
+spring.shardingsphere.datasource.ds_master_0_slave_1.password=
+
+spring.shardingsphere.datasource.ds_master_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1.username=root
+spring.shardingsphere.datasource.ds_master_1.password=
+
+spring.shardingsphere.datasource.ds_master_1_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1_slave_0.username=root
+spring.shardingsphere.datasource.ds_master_1_slave_0.password=
+spring.shardingsphere.datasource.ds_master_1_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1_slave_1.username=root
+spring.shardingsphere.datasource.ds_master_1_slave_1.password=
+
+spring.shardingsphere.sharding.tables.t_user.actual-data-nodes=ds_$->{0..1}.t_user_$->{0..1}
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.algorithm-expression=t_user_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.key-generator.column=user_id
+spring.shardingsphere.sharding.tables.t_user.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_user.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.master-slave-rules.ds_0.master-data-source-name=ds_master_0
+spring.shardingsphere.sharding.master-slave-rules.ds_0.slave-data-source-names=ds_master_0_slave_0, ds_master_0_slave_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.master-data-source-name=ds_master_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.slave-data-source-names=ds_master_1_slave_0, ds_master_1_slave_1
+
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.encryptor=encryptor_md5
+
+spring.shardingsphere.orchestration.name=cloud_sharding_master_slave_encrypt
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-cloud
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-master-slave.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-master-slave.properties
new file mode 100644
index 0000000..06aa079
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-master-slave.properties
@@ -0,0 +1,64 @@
+spring.shardingsphere.datasource.names=ds_master_0,ds_master_1,ds_master_0_slave_0,ds_master_0_slave_1,ds_master_1_slave_0,ds_master_1_slave_1
+
+spring.shardingsphere.datasource.ds_master_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0.username=root
+spring.shardingsphere.datasource.ds_master_0.password=
+
+spring.shardingsphere.datasource.ds_master_0_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0_slave_0.username=root
+spring.shardingsphere.datasource.ds_master_0_slave_0.password=
+spring.shardingsphere.datasource.ds_master_0_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0_slave_1.username=root
+spring.shardingsphere.datasource.ds_master_0_slave_1.password=
+
+spring.shardingsphere.datasource.ds_master_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1.username=root
+spring.shardingsphere.datasource.ds_master_1.password=
+
+spring.shardingsphere.datasource.ds_master_1_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1_slave_0.username=root
+spring.shardingsphere.datasource.ds_master_1_slave_0.password=
+spring.shardingsphere.datasource.ds_master_1_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1_slave_1.username=root
+spring.shardingsphere.datasource.ds_master_1_slave_1.password=
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.master-slave-rules.ds_0.master-data-source-name=ds_master_0
+spring.shardingsphere.sharding.master-slave-rules.ds_0.slave-data-source-names=ds_master_0_slave_0, ds_master_0_slave_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.master-data-source-name=ds_master_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.slave-data-source-names=ds_master_1_slave_0, ds_master_1_slave_1
+
+spring.shardingsphere.orchestration.name=cloud_sharding_master_slave
+spring.shardingsphere.orchestration.overwrite=false
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-cloud
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-tables.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-tables.properties
new file mode 100644
index 0000000..53a9583
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-cloud-zookeeper-sharding-tables.properties
@@ -0,0 +1,29 @@
+spring.shardingsphere.datasource.names=ds
+
+spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds.jdbc-url=jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds.username=root
+spring.shardingsphere.datasource.ds.password=
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.orchestration.name=demo_sharding_tables
+spring.shardingsphere.orchestration.overwrite=false
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-cloud
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-encrypt.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-encrypt.properties
new file mode 100644
index 0000000..66593b7
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-encrypt.properties
@@ -0,0 +1,23 @@
+spring.shardingsphere.datasource.names=ds
+
+spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds.jdbc-url=jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds.username=root
+spring.shardingsphere.datasource.ds.password=
+
+spring.shardingsphere.encrypt.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.encrypt.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.encrypt.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.encryptor=encryptor_md5
+
+spring.shardingsphere.orchestration.name=local_encrypt
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-local
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-master-slave.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-master-slave.properties
new file mode 100644
index 0000000..4de8fd6
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-master-slave.properties
@@ -0,0 +1,30 @@
+spring.shardingsphere.datasource.names=ds_master,ds_slave_0,ds_slave_1
+
+spring.shardingsphere.datasource.ds_master.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master
+spring.shardingsphere.datasource.ds_master.username=root
+spring.shardingsphere.datasource.ds_master.password=
+
+spring.shardingsphere.datasource.ds_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_slave_0
+spring.shardingsphere.datasource.ds_slave_0.username=root
+spring.shardingsphere.datasource.ds_slave_0.password=
+
+spring.shardingsphere.datasource.ds_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_slave_1
+spring.shardingsphere.datasource.ds_slave_1.username=root
+spring.shardingsphere.datasource.ds_slave_1.password=
+
+spring.shardingsphere.masterslave.load-balance-algorithm-type=round_robin
+spring.shardingsphere.masterslave.name=ds_ms
+spring.shardingsphere.masterslave.master-data-source-name=ds_master
+spring.shardingsphere.masterslave.slave-data-source-names=ds_slave_0,ds_slave_1
+
+spring.shardingsphere.orchestration.name=local_master_slave
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-local
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-databases-tables.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-databases-tables.properties
new file mode 100644
index 0000000..5e076e9
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-databases-tables.properties
@@ -0,0 +1,42 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_0
+spring.shardingsphere.datasource.ds_0.username=root
+spring.shardingsphere.datasource.ds_0.password=
+spring.shardingsphere.datasource.ds_0.max-active=16
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_1
+spring.shardingsphere.datasource.ds_1.username=root
+spring.shardingsphere.datasource.ds_1.password=
+spring.shardingsphere.datasource.ds_1.max-active=16
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.default-datasource-name=ds_0
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.orchestration.name=local_sharding
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-local
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-databases.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-databases.properties
new file mode 100644
index 0000000..b2098cd
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-databases.properties
@@ -0,0 +1,32 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_0.username=root
+spring.shardingsphere.datasource.ds_0.password=
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_1.username=root
+spring.shardingsphere.datasource.ds_1.password=
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.orchestration.name=local_sharding_databases
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-local
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-encrypt.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-encrypt.properties
new file mode 100644
index 0000000..d9bdd92
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-encrypt.properties
@@ -0,0 +1,38 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_0.username=root
+spring.shardingsphere.datasource.ds_0.password=
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_1.username=root
+spring.shardingsphere.datasource.ds_1.password=
+
+spring.shardingsphere.sharding.tables.t_user.actual-data-nodes=ds_$->{0..1}.t_user_$->{0..1}
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.algorithm-expression=t_user_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.key-generator.column=user_id
+spring.shardingsphere.sharding.tables.t_user.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_user.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.encryptor=encryptor_md5
+
+spring.shardingsphere.orchestration.name=local_sharding_encrypt
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-local
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-master-slave-encrypt.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-master-slave-encrypt.properties
new file mode 100644
index 0000000..1c1b519
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-master-slave-encrypt.properties
@@ -0,0 +1,65 @@
+spring.shardingsphere.datasource.names=ds_master_0,ds_master_1,ds_master_0_slave_0,ds_master_0_slave_1,ds_master_1_slave_0,ds_master_1_slave_1
+
+spring.shardingsphere.datasource.ds_master_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0.username=root
+spring.shardingsphere.datasource.ds_master_0.password=
+
+spring.shardingsphere.datasource.ds_master_0_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0_slave_0.username=root
+spring.shardingsphere.datasource.ds_master_0_slave_0.password=
+spring.shardingsphere.datasource.ds_master_0_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0_slave_1.username=root
+spring.shardingsphere.datasource.ds_master_0_slave_1.password=
+
+spring.shardingsphere.datasource.ds_master_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1.username=root
+spring.shardingsphere.datasource.ds_master_1.password=
+
+spring.shardingsphere.datasource.ds_master_1_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1_slave_0.username=root
+spring.shardingsphere.datasource.ds_master_1_slave_0.password=
+spring.shardingsphere.datasource.ds_master_1_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1_slave_1.username=root
+spring.shardingsphere.datasource.ds_master_1_slave_1.password=
+
+spring.shardingsphere.sharding.tables.t_user.actual-data-nodes=ds_$->{0..1}.t_user_$->{0..1}
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.algorithm-expression=t_user_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.key-generator.column=user_id
+spring.shardingsphere.sharding.tables.t_user.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_user.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.master-slave-rules.ds_0.master-data-source-name=ds_master_0
+spring.shardingsphere.sharding.master-slave-rules.ds_0.slave-data-source-names=ds_master_0_slave_0, ds_master_0_slave_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.master-data-source-name=ds_master_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.slave-data-source-names=ds_master_1_slave_0, ds_master_1_slave_1
+
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.encryptor=encryptor_md5
+
+spring.shardingsphere.orchestration.name=local_sharding_master_slave_encrypt
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-local
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-master-slave.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-master-slave.properties
new file mode 100644
index 0000000..3962bb3
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-master-slave.properties
@@ -0,0 +1,64 @@
+spring.shardingsphere.datasource.names=ds_master_0,ds_master_1,ds_master_0_slave_0,ds_master_0_slave_1,ds_master_1_slave_0,ds_master_1_slave_1
+
+spring.shardingsphere.datasource.ds_master_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0.username=root
+spring.shardingsphere.datasource.ds_master_0.password=
+
+spring.shardingsphere.datasource.ds_master_0_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0_slave_0.username=root
+spring.shardingsphere.datasource.ds_master_0_slave_0.password=
+spring.shardingsphere.datasource.ds_master_0_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0_slave_1.username=root
+spring.shardingsphere.datasource.ds_master_0_slave_1.password=
+
+spring.shardingsphere.datasource.ds_master_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1.username=root
+spring.shardingsphere.datasource.ds_master_1.password=
+
+spring.shardingsphere.datasource.ds_master_1_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1_slave_0.username=root
+spring.shardingsphere.datasource.ds_master_1_slave_0.password=
+spring.shardingsphere.datasource.ds_master_1_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1_slave_1.username=root
+spring.shardingsphere.datasource.ds_master_1_slave_1.password=
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.master-slave-rules.ds_0.master-data-source-name=ds_master_0
+spring.shardingsphere.sharding.master-slave-rules.ds_0.slave-data-source-names=ds_master_0_slave_0, ds_master_0_slave_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.master-data-source-name=ds_master_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.slave-data-source-names=ds_master_1_slave_0, ds_master_1_slave_1
+
+spring.shardingsphere.orchestration.name=local_sharding_master_slave
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-local
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-tables.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-tables.properties
new file mode 100644
index 0000000..00906d4
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application-local-zookeeper-sharding-tables.properties
@@ -0,0 +1,29 @@
+spring.shardingsphere.datasource.names=ds
+
+spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds.jdbc-url=jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds.username=root
+spring.shardingsphere.datasource.ds.password=
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.orchestration.name=local_sharding_tables
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-mysql-local
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application.properties
new file mode 100644
index 0000000..5a541a2
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-mysql-example/src/test/resources/application.properties
@@ -0,0 +1,19 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+
+#spring.profiles.active=local-zookeeper-sharding-databases-tables
+#spring.profiles.active=local-zookeeper-master-slave
+
+#spring.profiles.active=cloud-zookeeper-sharding-databases-tables
+#spring.profiles.active=cloud-zookeeper-master-slave
+
+#spring.profiles.active=local-zookeeper-encrypt
+#spring.profiles.active=cloud-zookeeper-encrypt
+
+#spring.profiles.active=local-nacos-sharding-databases-tables
+#spring.profiles.active=local-nacos-master-slave
+
+#spring.profiles.active=cloud-nacos-sharding-databases-tables
+#spring.profiles.active=cloud-nacos-master-slave
+
+#spring.profiles.active=local-nacos-encrypt
+#spring.profiles.active=cloud-nacos-encrypt
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/pom.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/pom.xml
new file mode 100644
index 0000000..dc54964
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/pom.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>orchestration-example</artifactId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <artifactId>orchestration-spring-boot-postgresql-example</artifactId>
+    <name>AcceptanceTest::orchestration::postgresql::spring-boot</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-spring-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-jdbc-orchestration-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-orchestration-reg-zookeeper-curator</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <version>42.2.5</version>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperEncryptTest.java
new file mode 100644
index 0000000..2c956dc
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-encrypt")
+public class CloudZookeeperEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperMasterSlavesTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperMasterSlavesTest.java
new file mode 100644
index 0000000..f878e8b
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperMasterSlavesTest.java
@@ -0,0 +1,32 @@
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-master-slave")
+public class CloudZookeeperMasterSlavesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingDatabasesTablesTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingDatabasesTablesTest.java
new file mode 100644
index 0000000..6ee9d0b
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingDatabasesTablesTest.java
@@ -0,0 +1,32 @@
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-sharding-databases-tables")
+public class CloudZookeeperShardingDatabasesTablesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingDatabaseAndTableResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingDatabasesTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingDatabasesTest.java
new file mode 100644
index 0000000..5082067
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingDatabasesTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-sharding-databases")
+public class CloudZookeeperShardingDatabasesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingDatabaseResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingEncryptTest.java
new file mode 100644
index 0000000..cc3ecc3
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-sharding-encrypt")
+public class CloudZookeeperShardingEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingMasterSlaveEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..8e66393
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-sharding-master-slave-encrypt")
+public class CloudZookeeperShardingMasterSlaveEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingMasterSlaveTest.java
new file mode 100644
index 0000000..69376e6
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingMasterSlaveTest.java
@@ -0,0 +1,32 @@
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-sharding-master-slave")
+public class CloudZookeeperShardingMasterSlaveTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingTablesTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingTablesTest.java
new file mode 100644
index 0000000..1e54b35
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/CloudZookeeperShardingTablesTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("cloud-zookeeper-sharding-tables")
+public class CloudZookeeperShardingTablesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingTableResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperEncryptTest.java
new file mode 100644
index 0000000..20949fe
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-encrypt")
+public class LocalZookeeperEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperMasterSlaveTest.java
new file mode 100644
index 0000000..99a3679
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperMasterSlaveTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-master-slave")
+public class LocalZookeeperMasterSlaveTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingDatabasesTablesTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingDatabasesTablesTest.java
new file mode 100644
index 0000000..80ae38f
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingDatabasesTablesTest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-sharding-databases-tables")
+public class LocalZookeeperShardingDatabasesTablesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingDatabaseAndTableResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingDatabasesTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingDatabasesTest.java
new file mode 100644
index 0000000..bef3174
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingDatabasesTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-sharding-databases")
+public class LocalZookeeperShardingDatabasesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingDatabaseResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingEncryptTest.java
new file mode 100644
index 0000000..250177a
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-sharding-encrypt")
+public class LocalZookeeperShardingEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingMasterSlaveEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..db6095c
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-sharding-master-slave-encrypt")
+public class LocalZookeeperShardingMasterSlaveEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingMasterSlaveTest.java
new file mode 100644
index 0000000..773c7ed
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingMasterSlaveTest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-sharding-master-slave")
+public class LocalZookeeperShardingMasterSlaveTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingTablesTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingTablesTest.java
new file mode 100644
index 0000000..663873d
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/LocalZookeeperShardingTablesTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootWithRegistryCenterTestMain.class)
+@ActiveProfiles("local-zookeeper-sharding-tables")
+public class LocalZookeeperShardingTablesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingTableResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/SpringBootWithRegistryCenterTestMain.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/SpringBootWithRegistryCenterTestMain.java
new file mode 100644
index 0000000..6b6a7f7
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/java/org/apache/shardingsphere/example/orchestration/spring/boot/SpringBootWithRegistryCenterTestMain.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.orchestration.spring.boot;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
+import org.springframework.context.annotation.ComponentScan;
+
+@ComponentScan("org.apache.shardingsphere.example.core.mybatis")
+@MapperScan(basePackages = "org.apache.shardingsphere.example.core.mybatis.repository")
+@SpringBootApplication(exclude = JtaAutoConfiguration.class)
+public class SpringBootWithRegistryCenterTestMain {
+    
+    public static void main(final String[] args) {
+        SpringApplication.run(SpringBootWithRegistryCenterTestMain.class, args);
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/META-INF/mybatis-config.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/META-INF/mybatis-config.xml
new file mode 100644
index 0000000..730d2f1
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/META-INF/mybatis-config.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <mappers>
+        <mapper resource="META-INF/mappers/postgresql/AddressMapper.xml"/>
+        <mapper resource="META-INF/mappers/postgresql/OrderMapper.xml"/>
+        <mapper resource="META-INF/mappers/postgresql/OrderItemMapper.xml"/>
+        <mapper resource="META-INF/mappers/postgresql/UserMapper.xml"/>
+    </mappers>
+</configuration>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-encrypt.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-encrypt.properties
new file mode 100644
index 0000000..29739eb
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-encrypt.properties
@@ -0,0 +1,23 @@
+spring.shardingsphere.datasource.names=ds
+
+spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds
+spring.shardingsphere.datasource.ds.username=postgres
+spring.shardingsphere.datasource.ds.password=
+
+spring.shardingsphere.encrypt.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.encrypt.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.encrypt.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.encryptor=encryptor_md5
+
+spring.shardingsphere.orchestration.name=cloud_encrypt
+spring.shardingsphere.orchestration.overwrite=false
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=orchestration-spring-boot-postgresql-cloud
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-master-slave.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-master-slave.properties
new file mode 100644
index 0000000..c491023
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-master-slave.properties
@@ -0,0 +1,30 @@
+spring.shardingsphere.datasource.names=ds_master,ds_slave_0,ds_slave_1
+
+spring.shardingsphere.datasource.ds_master.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master
+spring.shardingsphere.datasource.ds_master.username=postgres
+spring.shardingsphere.datasource.ds_master.password=
+
+spring.shardingsphere.datasource.ds_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_slave_0
+spring.shardingsphere.datasource.ds_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_slave_0.password=
+
+spring.shardingsphere.datasource.ds_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_slave_1
+spring.shardingsphere.datasource.ds_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_slave_1.password=
+
+spring.shardingsphere.masterslave.load-balance-algorithm-type=round_robin
+spring.shardingsphere.masterslave.name=ds_ms
+spring.shardingsphere.masterslave.master-data-source-name=ds_master
+spring.shardingsphere.masterslave.slave-data-source-names=ds_slave_0,ds_slave_1
+
+spring.shardingsphere.orchestration.name=cloud_master_slave
+spring.shardingsphere.orchestration.overwrite=false
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=orchestration-spring-boot-postgresql-cloud
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-databases-tables.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-databases-tables.properties
new file mode 100644
index 0000000..cccf894
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-databases-tables.properties
@@ -0,0 +1,42 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0
+spring.shardingsphere.datasource.ds_0.username=postgres
+spring.shardingsphere.datasource.ds_0.password=
+spring.shardingsphere.datasource.ds_0.max-active=16
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1
+spring.shardingsphere.datasource.ds_1.username=postgres
+spring.shardingsphere.datasource.ds_1.password=
+spring.shardingsphere.datasource.ds_1.max-active=16
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.default-datasource-name=ds_0
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.orchestration.name=cloud_sharding
+spring.shardingsphere.orchestration.overwrite=false
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-postgresql-cloud
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-databases.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-databases.properties
new file mode 100644
index 0000000..ccb33b8
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-databases.properties
@@ -0,0 +1,32 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0
+spring.shardingsphere.datasource.ds_0.username=postgres
+spring.shardingsphere.datasource.ds_0.password=
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1
+spring.shardingsphere.datasource.ds_1.username=postgres
+spring.shardingsphere.datasource.ds_1.password=
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.orchestration.name=cloud_sharding_databases
+spring.shardingsphere.orchestration.overwrite=false
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=orchestration-spring-boot-postgresql-cloud
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-encrypt.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-encrypt.properties
new file mode 100644
index 0000000..ad0b111
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-encrypt.properties
@@ -0,0 +1,38 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0
+spring.shardingsphere.datasource.ds_0.username=postgres
+spring.shardingsphere.datasource.ds_0.password=
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1
+spring.shardingsphere.datasource.ds_1.username=postgres
+spring.shardingsphere.datasource.ds_1.password=
+
+spring.shardingsphere.sharding.tables.t_user.actual-data-nodes=ds_$->{0..1}.t_user_$->{0..1}
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.algorithm-expression=t_user_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.key-generator.column=user_id
+spring.shardingsphere.sharding.tables.t_user.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_user.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.encryptor=encryptor_md5
+
+spring.shardingsphere.orchestration.name=cloud_sharding_encrypt
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-postgresql-cloud
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-master-slave-encrypt.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-master-slave-encrypt.properties
new file mode 100644
index 0000000..c5cf49a
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-master-slave-encrypt.properties
@@ -0,0 +1,65 @@
+spring.shardingsphere.datasource.names=ds_master_0,ds_master_1,ds_master_0_slave_0,ds_master_0_slave_1,ds_master_1_slave_0,ds_master_1_slave_1
+
+spring.shardingsphere.datasource.ds_master_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0
+spring.shardingsphere.datasource.ds_master_0.username=postgres
+spring.shardingsphere.datasource.ds_master_0.password=
+
+spring.shardingsphere.datasource.ds_master_0_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0
+spring.shardingsphere.datasource.ds_master_0_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_master_0_slave_0.password=
+spring.shardingsphere.datasource.ds_master_0_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1
+spring.shardingsphere.datasource.ds_master_0_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_master_0_slave_1.password=
+
+spring.shardingsphere.datasource.ds_master_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1
+spring.shardingsphere.datasource.ds_master_1.username=postgres
+spring.shardingsphere.datasource.ds_master_1.password=
+
+spring.shardingsphere.datasource.ds_master_1_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0
+spring.shardingsphere.datasource.ds_master_1_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_master_1_slave_0.password=
+spring.shardingsphere.datasource.ds_master_1_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1
+spring.shardingsphere.datasource.ds_master_1_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_master_1_slave_1.password=
+
+spring.shardingsphere.sharding.tables.t_user.actual-data-nodes=ds_$->{0..1}.t_user_$->{0..1}
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.algorithm-expression=t_user_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.key-generator.column=user_id
+spring.shardingsphere.sharding.tables.t_user.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_user.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.master-slave-rules.ds_0.master-data-source-name=ds_master_0
+spring.shardingsphere.sharding.master-slave-rules.ds_0.slave-data-source-names=ds_master_0_slave_0, ds_master_0_slave_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.master-data-source-name=ds_master_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.slave-data-source-names=ds_master_1_slave_0, ds_master_1_slave_1
+
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.encryptor=encryptor_md5
+
+spring.shardingsphere.orchestration.name=cloud_sharding_master_slave_encrypt
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-postgresql-cloud
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-master-slave.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-master-slave.properties
new file mode 100644
index 0000000..d74d4cb
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-master-slave.properties
@@ -0,0 +1,64 @@
+spring.shardingsphere.datasource.names=ds_master_0,ds_master_1,ds_master_0_slave_0,ds_master_0_slave_1,ds_master_1_slave_0,ds_master_1_slave_1
+
+spring.shardingsphere.datasource.ds_master_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0
+spring.shardingsphere.datasource.ds_master_0.username=postgres
+spring.shardingsphere.datasource.ds_master_0.password=
+
+spring.shardingsphere.datasource.ds_master_0_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0
+spring.shardingsphere.datasource.ds_master_0_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_master_0_slave_0.password=
+spring.shardingsphere.datasource.ds_master_0_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1
+spring.shardingsphere.datasource.ds_master_0_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_master_0_slave_1.password=
+
+spring.shardingsphere.datasource.ds_master_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1
+spring.shardingsphere.datasource.ds_master_1.username=postgres
+spring.shardingsphere.datasource.ds_master_1.password=
+
+spring.shardingsphere.datasource.ds_master_1_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0
+spring.shardingsphere.datasource.ds_master_1_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_master_1_slave_0.password=
+spring.shardingsphere.datasource.ds_master_1_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1
+spring.shardingsphere.datasource.ds_master_1_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_master_1_slave_1.password=
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.master-slave-rules.ds_0.master-data-source-name=ds_master_0
+spring.shardingsphere.sharding.master-slave-rules.ds_0.slave-data-source-names=ds_master_0_slave_0, ds_master_0_slave_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.master-data-source-name=ds_master_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.slave-data-source-names=ds_master_1_slave_0, ds_master_1_slave_1
+
+spring.shardingsphere.orchestration.name=cloud_sharding_master_slave
+spring.shardingsphere.orchestration.overwrite=false
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-postgresql-cloud
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-tables.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-tables.properties
new file mode 100644
index 0000000..514aa04
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-cloud-zookeeper-sharding-tables.properties
@@ -0,0 +1,29 @@
+spring.shardingsphere.datasource.names=ds
+
+spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds
+spring.shardingsphere.datasource.ds.username=postgres
+spring.shardingsphere.datasource.ds.password=
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.orchestration.name=demo_sharding_tables
+spring.shardingsphere.orchestration.overwrite=false
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-postgresql-cloud
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-encrypt.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-encrypt.properties
new file mode 100644
index 0000000..38d8cef
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-encrypt.properties
@@ -0,0 +1,23 @@
+spring.shardingsphere.datasource.names=ds
+
+spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds
+spring.shardingsphere.datasource.ds.username=postgres
+spring.shardingsphere.datasource.ds.password=
+
+spring.shardingsphere.encrypt.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.encrypt.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.encrypt.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.encryptor=encryptor_md5
+
+spring.shardingsphere.orchestration.name=local_encrypt
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-postgresql-local
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-master-slave.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-master-slave.properties
new file mode 100644
index 0000000..25aa832
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-master-slave.properties
@@ -0,0 +1,30 @@
+spring.shardingsphere.datasource.names=ds_master,ds_slave_0,ds_slave_1
+
+spring.shardingsphere.datasource.ds_master.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master
+spring.shardingsphere.datasource.ds_master.username=postgres
+spring.shardingsphere.datasource.ds_master.password=
+
+spring.shardingsphere.datasource.ds_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_slave_0
+spring.shardingsphere.datasource.ds_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_slave_0.password=
+
+spring.shardingsphere.datasource.ds_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_slave_1
+spring.shardingsphere.datasource.ds_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_slave_1.password=
+
+spring.shardingsphere.masterslave.load-balance-algorithm-type=round_robin
+spring.shardingsphere.masterslave.name=ds_ms
+spring.shardingsphere.masterslave.master-data-source-name=ds_master
+spring.shardingsphere.masterslave.slave-data-source-names=ds_slave_0,ds_slave_1
+
+spring.shardingsphere.orchestration.name=local_master_slave
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-postgresql-local
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-databases-tables.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-databases-tables.properties
new file mode 100644
index 0000000..e01df88
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-databases-tables.properties
@@ -0,0 +1,42 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0
+spring.shardingsphere.datasource.ds_0.username=postgres
+spring.shardingsphere.datasource.ds_0.password=
+spring.shardingsphere.datasource.ds_0.max-active=16
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1
+spring.shardingsphere.datasource.ds_1.username=postgres
+spring.shardingsphere.datasource.ds_1.password=
+spring.shardingsphere.datasource.ds_1.max-active=16
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.default-datasource-name=ds_0
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.orchestration.name=local_sharding
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-postgresql-local
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-databases.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-databases.properties
new file mode 100644
index 0000000..95831f0
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-databases.properties
@@ -0,0 +1,32 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0
+spring.shardingsphere.datasource.ds_0.username=postgres
+spring.shardingsphere.datasource.ds_0.password=
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1
+spring.shardingsphere.datasource.ds_1.username=postgres
+spring.shardingsphere.datasource.ds_1.password=
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.orchestration.name=local_sharding_databases
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-postgresql-local
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-encrypt.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-encrypt.properties
new file mode 100644
index 0000000..d09368c
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-encrypt.properties
@@ -0,0 +1,38 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0
+spring.shardingsphere.datasource.ds_0.username=postgres
+spring.shardingsphere.datasource.ds_0.password=
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1
+spring.shardingsphere.datasource.ds_1.username=postgres
+spring.shardingsphere.datasource.ds_1.password=
+
+spring.shardingsphere.sharding.tables.t_user.actual-data-nodes=ds_$->{0..1}.t_user_$->{0..1}
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.algorithm-expression=t_user_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.key-generator.column=user_id
+spring.shardingsphere.sharding.tables.t_user.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_user.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.encryptor=encryptor_md5
+
+spring.shardingsphere.orchestration.name=local_sharding_encrypt
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-postgresql-local
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-master-slave-encrypt.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-master-slave-encrypt.properties
new file mode 100644
index 0000000..d88d213
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-master-slave-encrypt.properties
@@ -0,0 +1,65 @@
+spring.shardingsphere.datasource.names=ds_master_0,ds_master_1,ds_master_0_slave_0,ds_master_0_slave_1,ds_master_1_slave_0,ds_master_1_slave_1
+
+spring.shardingsphere.datasource.ds_master_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0
+spring.shardingsphere.datasource.ds_master_0.username=postgres
+spring.shardingsphere.datasource.ds_master_0.password=
+
+spring.shardingsphere.datasource.ds_master_0_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0
+spring.shardingsphere.datasource.ds_master_0_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_master_0_slave_0.password=
+spring.shardingsphere.datasource.ds_master_0_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1
+spring.shardingsphere.datasource.ds_master_0_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_master_0_slave_1.password=
+
+spring.shardingsphere.datasource.ds_master_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1
+spring.shardingsphere.datasource.ds_master_1.username=postgres
+spring.shardingsphere.datasource.ds_master_1.password=
+
+spring.shardingsphere.datasource.ds_master_1_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0
+spring.shardingsphere.datasource.ds_master_1_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_master_1_slave_0.password=
+spring.shardingsphere.datasource.ds_master_1_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1
+spring.shardingsphere.datasource.ds_master_1_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_master_1_slave_1.password=
+
+spring.shardingsphere.sharding.tables.t_user.actual-data-nodes=ds_$->{0..1}.t_user_$->{0..1}
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.algorithm-expression=t_user_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.key-generator.column=user_id
+spring.shardingsphere.sharding.tables.t_user.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_user.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.master-slave-rules.ds_0.master-data-source-name=ds_master_0
+spring.shardingsphere.sharding.master-slave-rules.ds_0.slave-data-source-names=ds_master_0_slave_0, ds_master_0_slave_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.master-data-source-name=ds_master_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.slave-data-source-names=ds_master_1_slave_0, ds_master_1_slave_1
+
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.encryptor=encryptor_md5
+
+spring.shardingsphere.orchestration.name=local_sharding_master_slave_encrypt
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-postgresql-local
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-master-slave.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-master-slave.properties
new file mode 100644
index 0000000..4ba5a7b
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-master-slave.properties
@@ -0,0 +1,64 @@
+spring.shardingsphere.datasource.names=ds_master_0,ds_master_1,ds_master_0_slave_0,ds_master_0_slave_1,ds_master_1_slave_0,ds_master_1_slave_1
+
+spring.shardingsphere.datasource.ds_master_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0
+spring.shardingsphere.datasource.ds_master_0.username=postgres
+spring.shardingsphere.datasource.ds_master_0.password=
+
+spring.shardingsphere.datasource.ds_master_0_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0
+spring.shardingsphere.datasource.ds_master_0_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_master_0_slave_0.password=
+spring.shardingsphere.datasource.ds_master_0_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1
+spring.shardingsphere.datasource.ds_master_0_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_master_0_slave_1.password=
+
+spring.shardingsphere.datasource.ds_master_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1
+spring.shardingsphere.datasource.ds_master_1.username=postgres
+spring.shardingsphere.datasource.ds_master_1.password=
+
+spring.shardingsphere.datasource.ds_master_1_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0
+spring.shardingsphere.datasource.ds_master_1_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_master_1_slave_0.password=
+spring.shardingsphere.datasource.ds_master_1_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1
+spring.shardingsphere.datasource.ds_master_1_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_master_1_slave_1.password=
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.master-slave-rules.ds_0.master-data-source-name=ds_master_0
+spring.shardingsphere.sharding.master-slave-rules.ds_0.slave-data-source-names=ds_master_0_slave_0, ds_master_0_slave_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.master-data-source-name=ds_master_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.slave-data-source-names=ds_master_1_slave_0, ds_master_1_slave_1
+
+spring.shardingsphere.orchestration.name=local_sharding_master_slave
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-postgresql-local
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-tables.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-tables.properties
new file mode 100644
index 0000000..ae6e8d2
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application-local-zookeeper-sharding-tables.properties
@@ -0,0 +1,29 @@
+spring.shardingsphere.datasource.names=ds
+
+spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds
+spring.shardingsphere.datasource.ds.username=postgres
+spring.shardingsphere.datasource.ds.password=
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.orchestration.name=local_sharding_tables
+spring.shardingsphere.orchestration.overwrite=true
+spring.shardingsphere.orchestration.registry.type=zookeeper
+spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
+spring.shardingsphere.orchestration.registry.namespace=lorchestration-spring-boot-postgresql-local
\ No newline at end of file
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application.properties b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application.properties
new file mode 100644
index 0000000..5a541a2
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-boot-postgresql-example/src/test/resources/application.properties
@@ -0,0 +1,19 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+
+#spring.profiles.active=local-zookeeper-sharding-databases-tables
+#spring.profiles.active=local-zookeeper-master-slave
+
+#spring.profiles.active=cloud-zookeeper-sharding-databases-tables
+#spring.profiles.active=cloud-zookeeper-master-slave
+
+#spring.profiles.active=local-zookeeper-encrypt
+#spring.profiles.active=cloud-zookeeper-encrypt
+
+#spring.profiles.active=local-nacos-sharding-databases-tables
+#spring.profiles.active=local-nacos-master-slave
+
+#spring.profiles.active=cloud-nacos-sharding-databases-tables
+#spring.profiles.active=cloud-nacos-master-slave
+
+#spring.profiles.active=local-nacos-encrypt
+#spring.profiles.active=cloud-nacos-encrypt
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/pom.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/pom.xml
new file mode 100644
index 0000000..3da2caf
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/pom.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>orchestration-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>orchestration-spring-namespace-mysql-example</artifactId>
+
+    <name>AcceptanceTest::orchestration::mysql::spring-namespace-mybatis</name>
+    <!-- FIXME change it to the project's website -->
+    <url>http://www.example.com</url>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.7</maven.compiler.source>
+        <maven.compiler.target>1.7</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.11</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>config-utility</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-spring-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-jdbc-spring-namespace</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+            <version>4.3.25.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-orchestration-reg-api</artifactId>
+            <version>${shardingsphere.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-orchestration-reg-zookeeper-curator</artifactId>
+            <version>${shardingsphere.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-jdbc-orchestration-spring-namespace</artifactId>
+            <version>${shardingsphere.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+            <plugins>
+                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+                <plugin>
+                    <artifactId>maven-clean-plugin</artifactId>
+                    <version>3.1.0</version>
+                </plugin>
+                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+                <plugin>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.8.0</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.22.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-install-plugin</artifactId>
+                    <version>2.5.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <version>2.8.2</version>
+                </plugin>
+                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+                <plugin>
+                    <artifactId>maven-site-plugin</artifactId>
+                    <version>3.7.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-project-info-reports-plugin</artifactId>
+                    <version>3.0.0</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+</project>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
new file mode 100644
index 0000000..d1e6ed5
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-encrypt.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
new file mode 100644
index 0000000..e2961eb
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceMasterSlaveTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-master-slave.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
new file mode 100644
index 0000000..b270dc3
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingEncryptTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-sharding-encrypt.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..2ecf1a4
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave-encrypt.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
new file mode 100644
index 0000000..35d5cdf
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
new file mode 100644
index 0000000..2a97bf0
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-sharding-databases-tables.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingDatabaseAndTableResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-encrypt.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-encrypt.xml
new file mode 100644
index 0000000..1b846c6
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-encrypt.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:reg="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/util
+                        http://www.springframework.org/schema/util/spring-util.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                         http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="demo_ds" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl"
+                  value="jdbc:mysql://localhost:3306/demo_ds?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+
+    <bean:properties id="props">
+        <prop key="aes.key.value">123456</prop>
+    </bean:properties>
+
+    <encrypt:data-source id="encryptDataSource" data-source-name="demo_ds">
+        <encrypt:encrypt-rule>
+            <encrypt:tables>
+                <encrypt:table name="t_user">
+                    <encrypt:column logic-column="user_name" plain-column="user_name" cipher-column="user_name_cipher"
+                                    encryptor-ref="encryptor_md5"/>
+                    <encrypt:column logic-column="pwd" plain-column="pwd_plain" cipher-column="pwd_cipher"
+                                    encryptor-ref="encryptor_md5"/>
+                </encrypt:table>
+            </encrypt:tables>
+            <encrypt:encryptors>
+                <encrypt:encryptor id="encryptor_aes" type="AES" props-ref="props"/>
+                <encrypt:encryptor id="encryptor_md5" type="MD5"/>
+            </encrypt:encryptors>
+        </encrypt:encrypt-rule>
+        <encrypt:props>
+            <prop key="sql.show">false</prop>
+        </encrypt:props>
+    </encrypt:data-source>
+    
+    <reg:encrypt-data-source id="orchestration-spring-namespace-mysql-encrypt" registry-center-ref="myRegistry" data-source-ref="encryptDataSource" overwrite="true"/>
+
+    <reg:registry-center id="myRegistry" type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-mysql" />
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="encryptDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-master-slave.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-master-slave.xml
new file mode 100644
index 0000000..5b5b310
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-master-slave.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:reg="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans 
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                         http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_master" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_slave_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_slave_1?useSSL=false"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" />
+    <master-slave:data-source id="masterSlaveDataSource" master-data-source-name="demo_ds_master" slave-data-source-names="demo_ds_slave_0, demo_ds_slave_1" strategy-ref="randomStrategy" />
+    
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="masterSlaveDataSource" />
+    </bean>
+
+    <reg:master-slave-data-source id="orchestration-spring-namespace-mysql-master-slave" registry-center-ref="myRegistry" data-source-ref="masterSlaveDataSource" overwrite="true"/>
+
+    <reg:registry-center id="myRegistry" type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-mysql" />
+
+    <tx:annotation-driven />
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="masterSlaveDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
new file mode 100644
index 0000000..bd74ae4
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:reg="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_${user_id % 2}" />
+    <sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order_${order_id % 2}" />
+    <sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_id" algorithm-expression="t_order_item_${order_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+    
+    <sharding:key-generator id="orderKeyGenerator" type="SNOWFLAKE" column="order_id" props-ref="properties" />
+    <sharding:key-generator id="itemKeyGenerator" type="SNOWFLAKE" column="order_item_id" props-ref="properties" />
+    
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_0, demo_ds_1">
+            <sharding:table-rules>
+                <sharding:table-rule logic-table="t_order" actual-data-nodes="demo_ds_${0..1}.t_order_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderTableStrategy" key-generator-ref="orderKeyGenerator" />
+                <sharding:table-rule logic-table="t_order_item" actual-data-nodes="demo_ds_${0..1}.t_order_item_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderItemTableStrategy" key-generator-ref="itemKeyGenerator" />
+            </sharding:table-rules>
+            <sharding:binding-table-rules>
+                <sharding:binding-table-rule logic-tables="t_order,t_order_item"/>
+            </sharding:binding-table-rules>
+            <sharding:broadcast-table-rules>
+                <sharding:broadcast-table-rule table="t_address"/>
+            </sharding:broadcast-table-rules>
+        </sharding:sharding-rule>
+        <sharding:props>
+            <prop key="sql.show">false</prop>
+        </sharding:props>
+    </sharding:data-source>
+    
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+
+    <reg:sharding-data-source id="orchestration-spring-namespace-mysql-sharding" registry-center-ref="myRegistry" data-source-ref="shardingDataSource" overwrite="true"/>
+
+    <reg:registry-center id="myRegistry" type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-mysql" />
+
+
+    <tx:annotation-driven />
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-sharding-encrypt.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
new file mode 100644
index 0000000..cd75d61
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:reg="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                        http://www.springframework.org/schema/util
+                        http://www.springframework.org/schema/util/spring-util.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_${user_id % 2}" />
+    <sharding:inline-strategy id="tableStrategy" sharding-column="user_id" algorithm-expression="t_user_${user_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_0, demo_ds_1">
+            <sharding:encrypt-rule>
+                <encrypt:tables>
+                    <encrypt:table name="t_user">
+                        <encrypt:column logic-column="user_name" plain-column="user_name" cipher-column="user_name_cipher"  encryptor-ref="encryptor_aes" />
+                        <encrypt:column logic-column="pwd" plain-column="pwd_plain" cipher-column="pwd_cipher" encryptor-ref="encryptor_md5"/>
+                    </encrypt:table>
+                </encrypt:tables>
+                <encrypt:encryptors>
+                    <encrypt:encryptor id="encryptor_aes" type="AES"  props-ref="props"/>
+                    <encrypt:encryptor id="encryptor_md5" type="MD5" />
+                </encrypt:encryptors>
+            </sharding:encrypt-rule>
+            <sharding:table-rules>
+                <sharding:table-rule
+                        logic-table="t_user"
+                        actual-data-nodes="demo_ds_${0..1}.t_user_${0..1}"
+                        database-strategy-ref="databaseStrategy"
+                        table-strategy-ref="tableStrategy"
+                />
+            </sharding:table-rules>
+        </sharding:sharding-rule>
+
+        <sharding:props>
+            <prop key="sql.show">true</prop>
+        </sharding:props>
+    </sharding:data-source>
+
+    <bean:properties id="props">
+        <prop key="aes.key.value">123456</prop>
+    </bean:properties>
+
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+
+    <reg:sharding-data-source id="orchestration-spring-namespace-mysql-sharding-encrypt" registry-center-ref="myRegistry" data-source-ref="shardingDataSource" overwrite="true"/>
+
+    <reg:registry-center id="myRegistry" type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-mysql" />
+
+
+    <tx:annotation-driven />
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
new file mode 100644
index 0000000..640509f
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:reg="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd
+                        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd http://shardingsphere.apache.org/schema/shardingsphere/encrypt http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_master_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_ms_${user_id % 2}" />
+    <sharding:inline-strategy id="tableStrategy" sharding-column="user_id" algorithm-expression="t_user_${user_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+    
+    <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" />
+
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_master_0,demo_ds_master_0_slave_0,demo_ds_master_0_slave_1,demo_ds_master_1,demo_ds_master_1_slave_0,demo_ds_master_1_slave_1">
+            <sharding:encrypt-rule>
+                <encrypt:tables>
+                    <encrypt:table name="t_user">
+                        <encrypt:column logic-column="user_name" plain-column="user_name" cipher-column="user_name_cipher"  encryptor-ref="encryptor_aes" />
+                        <encrypt:column logic-column="pwd" plain-column="pwd_plain" cipher-column="pwd_cipher" encryptor-ref="encryptor_md5"/>
+                    </encrypt:table>
+                </encrypt:tables>
+                <encrypt:encryptors>
+                    <encrypt:encryptor id="encryptor_aes" type="AES"  props-ref="props"/>
+                    <encrypt:encryptor id="encryptor_md5" type="MD5" />
+                </encrypt:encryptors>
+            </sharding:encrypt-rule>
+            <sharding:master-slave-rules>
+                <sharding:master-slave-rule id="demo_ds_ms_0" master-data-source-name="demo_ds_master_0" slave-data-source-names="demo_ds_master_0_slave_0, demo_ds_master_0_slave_1" strategy-ref="randomStrategy" />
+                <sharding:master-slave-rule id="demo_ds_ms_1" master-data-source-name="demo_ds_master_1" slave-data-source-names="demo_ds_master_1_slave_0, demo_ds_master_1_slave_1" strategy-ref="randomStrategy" />
+            </sharding:master-slave-rules>
+            <sharding:table-rules>
+                <sharding:table-rule
+                        logic-table="t_user"
+                        actual-data-nodes="demo_ds_ms_${0..1}.t_user_${0..1}"
+                        database-strategy-ref="databaseStrategy"
+                        table-strategy-ref="tableStrategy" />
+            </sharding:table-rules>
+        </sharding:sharding-rule>
+        <sharding:props>
+            <prop key="sql.show">false</prop>
+        </sharding:props>
+    </sharding:data-source>
+
+    <bean:properties id="props">
+        <prop key="aes.key.value">123456</prop>
+    </bean:properties>
+
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+    <tx:annotation-driven />
+
+    <reg:sharding-data-source id="orchestration-spring-namespace-mysql-sharding-MS-encrypt" registry-center-ref="myRegistry" data-source-ref="shardingDataSource" overwrite="true"/>
+    <reg:registry-center id="myRegistry" type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-mysql" />
+
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-sharding-master-slave.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
new file mode 100644
index 0000000..7363dc2
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-mysql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:reg="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd
+                        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_master_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_ms_${user_id % 2}" />
+    <sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order_${order_id % 2}" />
+    <sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_item_id" algorithm-expression="t_order_item_${order_item_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+
+    <sharding:key-generator id="orderKeyGenerator" type="SNOWFLAKE" column="order_id" props-ref="properties" />
+    <sharding:key-generator id="itemKeyGenerator" type="SNOWFLAKE" column="order_item_id" props-ref="properties" />
+    
+    <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" />
+
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_master_0,demo_ds_master_0_slave_0,demo_ds_master_0_slave_1,demo_ds_master_1,demo_ds_master_1_slave_0,demo_ds_master_1_slave_1">
+            <sharding:master-slave-rules>
+                <sharding:master-slave-rule id="demo_ds_ms_0" master-data-source-name="demo_ds_master_0" slave-data-source-names="demo_ds_master_0_slave_0, demo_ds_master_0_slave_1" strategy-ref="randomStrategy" />
+                <sharding:master-slave-rule id="demo_ds_ms_1" master-data-source-name="demo_ds_master_1" slave-data-source-names="demo_ds_master_1_slave_0, demo_ds_master_1_slave_1" strategy-ref="randomStrategy" />
+            </sharding:master-slave-rules>
+            <sharding:table-rules>
+                <sharding:table-rule logic-table="t_order" actual-data-nodes="demo_ds_ms_${0..1}.t_order_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderTableStrategy" key-generator-ref="orderKeyGenerator"/>
+                <sharding:table-rule logic-table="t_order_item" actual-data-nodes="demo_ds_ms_${0..1}.t_order_item_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderItemTableStrategy" key-generator-ref="itemKeyGenerator"/>
+            </sharding:table-rules>
+            <sharding:binding-table-rules>
+                <sharding:binding-table-rule logic-tables="t_order,t_order_item"/>
+            </sharding:binding-table-rules>
+            <sharding:broadcast-table-rules>
+                <sharding:broadcast-table-rule table="t_address"/>
+            </sharding:broadcast-table-rules>
+        </sharding:sharding-rule>
+        <sharding:props>
+            <prop key="sql.show">false</prop>
+        </sharding:props>
+    </sharding:data-source>
+    
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+    <reg:sharding-data-source id="orchestration-spring-namespace-mysql-sharding-MS" registry-center-ref="myRegistry" data-source-ref="shardingDataSource" overwrite="true"/>
+
+    <reg:registry-center id="myRegistry" type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-mysql" />
+
+    <tx:annotation-driven />
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/pom.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/pom.xml
new file mode 100644
index 0000000..1582b23
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/pom.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>orchestration-example</artifactId>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <version>4.0.0-RC4-SNAPSHOT</version>
+  </parent>
+  <groupId>org.apache.shardingsphere.example</groupId>
+  <artifactId>orchestration-spring-namespace-postgresql-example</artifactId>
+
+  <name>AcceptanceTest::orchestration::postgresql::spring-namespace-mybatis</name>
+  <!-- FIXME change it to the project's website -->
+  <url>http://www.example.com</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.11</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>config-utility</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>example-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>example-spring-mybatis</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.shardingsphere</groupId>
+      <artifactId>sharding-jdbc-spring-namespace</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context</artifactId>
+      <version>4.3.25.RELEASE</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere</groupId>
+      <artifactId>sharding-orchestration-reg-api</artifactId>
+      <version>${shardingsphere.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere</groupId>
+      <artifactId>sharding-orchestration-reg-zookeeper-curator</artifactId>
+      <version>${shardingsphere.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere</groupId>
+      <artifactId>sharding-jdbc-orchestration-spring-namespace</artifactId>
+      <version>${shardingsphere.version}</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+      <plugins>
+        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+        <plugin>
+          <artifactId>maven-clean-plugin</artifactId>
+          <version>3.1.0</version>
+        </plugin>
+        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+        <plugin>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.8.0</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.22.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-install-plugin</artifactId>
+          <version>2.5.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <version>2.8.2</version>
+        </plugin>
+        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+        <plugin>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.7.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-project-info-reports-plugin</artifactId>
+          <version>3.0.0</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
new file mode 100644
index 0000000..d1e6ed5
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-encrypt.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
new file mode 100644
index 0000000..e2961eb
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceMasterSlaveTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-master-slave.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
new file mode 100644
index 0000000..b270dc3
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingEncryptTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-sharding-encrypt.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..2ecf1a4
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave-encrypt.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
new file mode 100644
index 0000000..35d5cdf
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
new file mode 100644
index 0000000..2a97bf0
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-sharding-databases-tables.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingDatabaseAndTableResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-encrypt.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-encrypt.xml
new file mode 100644
index 0000000..bba99a2
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-encrypt.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:reg="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/util
+                        http://www.springframework.org/schema/util/spring-util.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                         http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+
+    <bean:properties id="props">
+        <prop key="aes.key.value">123456</prop>
+    </bean:properties>
+
+    <encrypt:data-source id="encryptDataSource" data-source-name="demo_ds" >
+        <encrypt:encrypt-rule>
+            <encrypt:tables>
+                <encrypt:table name="t_user">
+                    <encrypt:column logic-column="user_name" plain-column="user_name" cipher-column="user_name_cipher" encryptor-ref="encryptor_md5" />
+                    <encrypt:column logic-column="pwd" plain-column="pwd_plain" cipher-column="pwd_cipher" encryptor-ref="encryptor_md5"/>
+                </encrypt:table>
+            </encrypt:tables>
+            <encrypt:encryptors>
+                <encrypt:encryptor id="encryptor_aes" type="AES" props-ref="props"/>
+                <encrypt:encryptor id="encryptor_md5" type="MD5" />
+            </encrypt:encryptors>
+        </encrypt:encrypt-rule>
+        <encrypt:props>
+            <prop key="sql.show">false</prop>
+        </encrypt:props>
+    </encrypt:data-source>
+
+    <reg:encrypt-data-source id="orchestration-spring-namespace-postgresql-encrypt" registry-center-ref="myRegistry" data-source-ref="encryptDataSource" overwrite="true"/>
+
+    <reg:registry-center id="myRegistry" type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-postgresql" />
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="encryptDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-master-slave.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-master-slave.xml
new file mode 100644
index 0000000..1535b93
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-master-slave.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:reg="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans 
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                         http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_master" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_slave_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_slave_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" />
+    <master-slave:data-source id="masterSlaveDataSource" master-data-source-name="demo_ds_master" slave-data-source-names="demo_ds_slave_0, demo_ds_slave_1" strategy-ref="randomStrategy" />
+    
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="masterSlaveDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    <reg:master-slave-data-source id="orchestration-spring-namespace-postgresql-master-slave" registry-center-ref="myRegistry" data-source-ref="masterSlaveDataSource" overwrite="true"/>
+
+    <reg:registry-center id="myRegistry" type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-postgresql" />
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="masterSlaveDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
new file mode 100644
index 0000000..c8e39a7
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:reg="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd http://www.springframework.org/schema/util
+                        http://www.springframework.org/schema/util/spring-util.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                         http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_${user_id % 2}" />
+    <sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order_${order_id % 2}" />
+    <sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_id" algorithm-expression="t_order_item_${order_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+    
+    <sharding:key-generator id="orderKeyGenerator" type="SNOWFLAKE" column="order_id" props-ref="properties" />
+    <sharding:key-generator id="itemKeyGenerator" type="SNOWFLAKE" column="order_item_id" props-ref="properties" />
+    
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_0, demo_ds_1">
+            <sharding:table-rules>
+                <sharding:table-rule logic-table="t_order" actual-data-nodes="demo_ds_${0..1}.t_order_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderTableStrategy" key-generator-ref="orderKeyGenerator" />
+                <sharding:table-rule logic-table="t_order_item" actual-data-nodes="demo_ds_${0..1}.t_order_item_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderItemTableStrategy" key-generator-ref="itemKeyGenerator" />
+            </sharding:table-rules>
+            <sharding:binding-table-rules>
+                <sharding:binding-table-rule logic-tables="t_order,t_order_item"/>
+            </sharding:binding-table-rules>
+            <sharding:broadcast-table-rules>
+                <sharding:broadcast-table-rule table="t_address"/>
+            </sharding:broadcast-table-rules>
+        </sharding:sharding-rule>
+        <sharding:props>
+            <prop key="sql.show">false</prop>
+        </sharding:props>
+    </sharding:data-source>
+    
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    <reg:sharding-data-source id="orchestration-spring-namespace-postgresql-sharding" registry-center-ref="myRegistry" data-source-ref="shardingDataSource" overwrite="true"/>
+
+    <reg:registry-center id="myRegistry" type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-postgresql" />
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-sharding-encrypt.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
new file mode 100644
index 0000000..500cb0f
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:reg="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                        http://www.springframework.org/schema/util
+                        http://www.springframework.org/schema/util/spring-util.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                         http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_${user_id % 2}" />
+    <sharding:inline-strategy id="tableStrategy" sharding-column="user_id" algorithm-expression="t_user_${user_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_0, demo_ds_1">
+            <sharding:encrypt-rule>
+                <encrypt:tables>
+                    <encrypt:table name="t_user">
+                        <encrypt:column logic-column="user_name" plain-column="user_name" cipher-column="user_name_cipher"  encryptor-ref="encryptor_aes" />
+                        <encrypt:column logic-column="pwd" plain-column="pwd_plain" cipher-column="pwd_cipher" encryptor-ref="encryptor_md5"/>
+                    </encrypt:table>
+                </encrypt:tables>
+                <encrypt:encryptors>
+                    <encrypt:encryptor id="encryptor_aes" type="AES"  props-ref="props"/>
+                    <encrypt:encryptor id="encryptor_md5" type="MD5" />
+                </encrypt:encryptors>
+            </sharding:encrypt-rule>
+            <sharding:table-rules>
+                <sharding:table-rule
+                        logic-table="t_user"
+                        actual-data-nodes="demo_ds_${0..1}.t_user_${0..1}"
+                        database-strategy-ref="databaseStrategy"
+                        table-strategy-ref="tableStrategy"
+                />
+            </sharding:table-rules>
+        </sharding:sharding-rule>
+
+        <sharding:props>
+            <prop key="sql.show">true</prop>
+        </sharding:props>
+    </sharding:data-source>
+
+    <bean:properties id="props">
+        <prop key="aes.key.value">123456</prop>
+    </bean:properties>
+
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    <reg:sharding-data-source id="orchestration-spring-namespace-postgresql-sharding-encrypt" registry-center-ref="myRegistry" data-source-ref="shardingDataSource" overwrite="true"/>
+
+    <reg:registry-center id="myRegistry" type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-postgresql" />
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
new file mode 100644
index 0000000..d0403d3
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:reg="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd http://shardingsphere.apache.org/schema/shardingsphere/encrypt http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                         http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_master_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_ms_${user_id % 2}" />
+    <sharding:inline-strategy id="tableStrategy" sharding-column="user_id" algorithm-expression="t_user_${user_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+    
+    <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" />
+
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_master_0,demo_ds_master_0_slave_0,demo_ds_master_0_slave_1,demo_ds_master_1,demo_ds_master_1_slave_0,demo_ds_master_1_slave_1">
+            <sharding:encrypt-rule>
+                <encrypt:tables>
+                    <encrypt:table name="t_user">
+                        <encrypt:column logic-column="user_name" plain-column="user_name" cipher-column="user_name_cipher"  encryptor-ref="encryptor_aes" />
+                        <encrypt:column logic-column="pwd" plain-column="pwd_plain" cipher-column="pwd_cipher" encryptor-ref="encryptor_md5"/>
+                    </encrypt:table>
+                </encrypt:tables>
+                <encrypt:encryptors>
+                    <encrypt:encryptor id="encryptor_aes" type="AES"  props-ref="props"/>
+                    <encrypt:encryptor id="encryptor_md5" type="MD5" />
+                </encrypt:encryptors>
+            </sharding:encrypt-rule>
+            <sharding:master-slave-rules>
+                <sharding:master-slave-rule id="demo_ds_ms_0" master-data-source-name="demo_ds_master_0" slave-data-source-names="demo_ds_master_0_slave_0, demo_ds_master_0_slave_1" strategy-ref="randomStrategy" />
+                <sharding:master-slave-rule id="demo_ds_ms_1" master-data-source-name="demo_ds_master_1" slave-data-source-names="demo_ds_master_1_slave_0, demo_ds_master_1_slave_1" strategy-ref="randomStrategy" />
+            </sharding:master-slave-rules>
+            <sharding:table-rules>
+                <sharding:table-rule
+                        logic-table="t_user"
+                        actual-data-nodes="demo_ds_ms_${0..1}.t_user_${0..1}"
+                        database-strategy-ref="databaseStrategy"
+                        table-strategy-ref="tableStrategy" />
+            </sharding:table-rules>
+        </sharding:sharding-rule>
+        <sharding:props>
+            <prop key="sql.show">false</prop>
+        </sharding:props>
+    </sharding:data-source>
+
+    <bean:properties id="props">
+        <prop key="aes.key.value">123456</prop>
+    </bean:properties>
+
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    <reg:sharding-data-source id="orchestration-spring-namespace-postgresql-sharding-MS-encrypt" registry-center-ref="myRegistry" data-source-ref="shardingDataSource" overwrite="true"/>
+    <reg:registry-center id="myRegistry" type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-postgresql" />
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave.xml b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
new file mode 100644
index 0000000..9b8c6c2
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:reg="http://shardingsphere.apache.org/schema/shardingsphere/orchestration"
+       xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/orchestration
+                         http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_master_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_ms_${user_id % 2}" />
+    <sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order_${order_id % 2}" />
+    <sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_item_id" algorithm-expression="t_order_item_${order_item_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+
+    <sharding:key-generator id="orderKeyGenerator" type="SNOWFLAKE" column="order_id" props-ref="properties" />
+    <sharding:key-generator id="itemKeyGenerator" type="SNOWFLAKE" column="order_item_id" props-ref="properties" />
+    
+    <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" />
+
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_master_0,demo_ds_master_0_slave_0,demo_ds_master_0_slave_1,demo_ds_master_1,demo_ds_master_1_slave_0,demo_ds_master_1_slave_1">
+            <sharding:master-slave-rules>
+                <sharding:master-slave-rule id="demo_ds_ms_0" master-data-source-name="demo_ds_master_0" slave-data-source-names="demo_ds_master_0_slave_0, demo_ds_master_0_slave_1" strategy-ref="randomStrategy" />
+                <sharding:master-slave-rule id="demo_ds_ms_1" master-data-source-name="demo_ds_master_1" slave-data-source-names="demo_ds_master_1_slave_0, demo_ds_master_1_slave_1" strategy-ref="randomStrategy" />
+            </sharding:master-slave-rules>
+            <sharding:table-rules>
+                <sharding:table-rule logic-table="t_order" actual-data-nodes="demo_ds_ms_${0..1}.t_order_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderTableStrategy" key-generator-ref="orderKeyGenerator"/>
+                <sharding:table-rule logic-table="t_order_item" actual-data-nodes="demo_ds_ms_${0..1}.t_order_item_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderItemTableStrategy" key-generator-ref="itemKeyGenerator"/>
+            </sharding:table-rules>
+            <sharding:binding-table-rules>
+                <sharding:binding-table-rule logic-tables="t_order,t_order_item"/>
+            </sharding:binding-table-rules>
+            <sharding:broadcast-table-rules>
+                <sharding:broadcast-table-rule table="t_address"/>
+            </sharding:broadcast-table-rules>
+        </sharding:sharding-rule>
+        <sharding:props>
+            <prop key="sql.show">false</prop>
+        </sharding:props>
+    </sharding:data-source>
+    
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    <reg:sharding-data-source id="orchestration-spring-namespace-postgresql-sharding-MS" registry-center-ref="myRegistry" data-source-ref="shardingDataSource" overwrite="true"/>
+
+    <reg:registry-center id="myRegistry" type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-postgresql" />
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/orchestration-example/pom.xml b/sharding-jdbc-example/orchestration-example/pom.xml
new file mode 100644
index 0000000..7aac398
--- /dev/null
+++ b/sharding-jdbc-example/orchestration-example/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>sharding-jdbc-example</artifactId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <artifactId>orchestration-example</artifactId>
+    <name>AcceptanceTest::orchestration::root</name>
+    <packaging>pom</packaging>
+    
+    <modules>
+        <module>orchestration-spring-boot-mysql-example</module>
+        <module>orchestration-spring-boot-postgresql-example</module>
+        <module>orchestration-raw-jdbc-mysql-example</module>
+        <module>orchestration-raw-jdbc-postgresql-example</module>
+        <module>orchestration-spring-namespace-mysql-example</module>
+        <module>orchestration-spring-namespace-postgresql-example</module>
+    </modules>
+</project>
diff --git a/sharding-jdbc-example/pom.xml b/sharding-jdbc-example/pom.xml
new file mode 100644
index 0000000..ae51641
--- /dev/null
+++ b/sharding-jdbc-example/pom.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>shardingsphere-example</artifactId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <artifactId>sharding-jdbc-example</artifactId>
+    <name>AcceptanceTest::jdbc::root</name>
+    
+    <packaging>pom</packaging>
+    
+    <modules>
+        <module>sharding-example</module>
+        <module>orchestration-example</module>
+    </modules>
+</project>
diff --git a/sharding-jdbc-example/sharding-example/pom.xml b/sharding-jdbc-example/sharding-example/pom.xml
new file mode 100644
index 0000000..698a263
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/pom.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>sharding-jdbc-example</artifactId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <artifactId>sharding-example</artifactId>
+    <name>AcceptanceTest::sharding::root</name>
+    
+    <packaging>pom</packaging>
+    
+    <modules>
+        <module>sharding-spring-boot-mybatis-mysql-example</module>
+        <module>sharding-spring-boot-mybatis-postgresql-example</module>
+        <module>sharding-raw-jdbc-mysql-example</module>
+        <module>sharding-raw-jdbc-postgresql-example</module>
+        <module>sharding-spring-namespace-mybatis-mysql-example</module>
+        <module>sharding-spring-namespace-mybatis-postgresql-example</module>
+    </modules>
+</project>
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/pom.xml b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/pom.xml
new file mode 100644
index 0000000..fb62a8d
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/pom.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-example</artifactId>
+    <version>4.0.0-RC4-SNAPSHOT</version>
+  </parent>
+  <groupId>org.apache.shardingsphere.example</groupId>
+  <artifactId>sharding-raw-jdbc-mysql-example</artifactId>
+
+  <name>AcceptanceTest::sharding::mysql::raw-jdbc</name>
+  <!-- FIXME change it to the project's website -->
+  <url>http://www.example.com</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.11</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>config-utility</artifactId>
+      <version>${project.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>example-api</artifactId>
+      <version>${project.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>example-raw-jdbc</artifactId>
+      <version>${project.version}</version>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+      <plugins>
+        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+        <plugin>
+          <artifactId>maven-clean-plugin</artifactId>
+          <version>3.1.0</version>
+        </plugin>
+        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+        <plugin>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.8.0</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.22.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-install-plugin</artifactId>
+          <version>2.5.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <version>2.8.2</version>
+        </plugin>
+        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+        <plugin>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.7.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-project-info-reports-plugin</artifactId>
+          <version>3.0.0</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
new file mode 100644
index 0000000..35bc670
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
new file mode 100644
index 0000000..4fcb348
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
@@ -0,0 +1,27 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaMasterSlaveTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
new file mode 100644
index 0000000..b908fd3
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
new file mode 100644
index 0000000..8037a76
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlave {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
new file mode 100644
index 0000000..2623613
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
@@ -0,0 +1,27 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlaveEncrypt {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaveEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
new file mode 100644
index 0000000..d577890
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingTest {
+     @Test
+    public void assertCommonService() throws SQLException {
+         DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_DATABASES_AND_TABLES);
+         ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+         ExampleExecuteTemplate.run(exampleService);
+         RawJdbcAssertUtils.assertShardingTableDatabases(exampleService);
+     }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlEncryptTest.java
new file mode 100644
index 0000000..5866267
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlEncryptTest.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlMasterSlaveTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlMasterSlaveTest.java
new file mode 100644
index 0000000..d619eeb
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlMasterSlaveTest.java
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlMasterSlaveTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingEncryptTest.java
new file mode 100644
index 0000000..68d277e
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingEncryptTest.java
@@ -0,0 +1,28 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..b2c0334
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingMasterSlaveEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaveEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveTest.java
new file mode 100644
index 0000000..4b47c63
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveTest.java
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingMasterSlaveTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingTest.java
new file mode 100644
index 0000000..d55c84a
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingTest.java
@@ -0,0 +1,28 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_DATABASES_AND_TABLES);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingTableDatabases(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/EncryptConfiguration.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/EncryptConfiguration.java
new file mode 100644
index 0000000..5a41fbb
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/EncryptConfiguration.java
@@ -0,0 +1,41 @@
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.encrypt.EncryptColumnRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptTableRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptorRuleConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.shardingjdbc.api.EncryptDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class EncryptConfiguration implements ExampleConfiguration {
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        return EncryptDataSourceFactory.createDataSource(DataSourceUtil.createDataSource("demo_ds", DatabaseType.MYSQL), getEncryptRuleConfiguration(), new Properties());
+    }
+
+    private EncryptRuleConfiguration getEncryptRuleConfiguration() {
+        Properties props = new Properties();
+        props.setProperty("aes.key.value", "123456");
+        EncryptorRuleConfiguration encryptorAES = new EncryptorRuleConfiguration("AES", props);
+        EncryptorRuleConfiguration encryptorMD5 = new EncryptorRuleConfiguration("MD5",new Properties());
+        Map<String, EncryptColumnRuleConfiguration> columns = new HashMap<>();
+        EncryptColumnRuleConfiguration columnUserName = new EncryptColumnRuleConfiguration("user_name", "user_name_cipher", "", "aes");
+        EncryptColumnRuleConfiguration columnPwd = new EncryptColumnRuleConfiguration("pwd_plain", "pwd_cipher", "", "md5");
+        columns.put("user_name",columnUserName);
+        columns.put("pwd",columnPwd);
+        EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration(columns);
+        EncryptRuleConfiguration result = new EncryptRuleConfiguration();
+        result.getEncryptors().put("aes", encryptorAES);
+        result.getEncryptors().put("md5",encryptorMD5);
+        result.getTables().put("t_user", tableConfig);
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/MasterSlaveConfiguration.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/MasterSlaveConfiguration.java
new file mode 100644
index 0000000..85003a7
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/MasterSlaveConfiguration.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.masterslave.MasterSlaveRuleConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.shardingjdbc.api.MasterSlaveDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public final class MasterSlaveConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig = new MasterSlaveRuleConfiguration("demo_ds_master_slave", "demo_ds_master", Arrays.asList("demo_ds_slave_0", "demo_ds_slave_1"));
+        return MasterSlaveDataSourceFactory.createDataSource(createDataSourceMap(), masterSlaveRuleConfig, new Properties());
+    }
+    
+    private Map<String, DataSource> createDataSourceMap() {
+        Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_master", DataSourceUtil.createDataSource("demo_ds_master", DatabaseType.MYSQL));
+        result.put("demo_ds_slave_0", DataSourceUtil.createDataSource("demo_ds_slave_0", DatabaseType.MYSQL));
+        result.put("demo_ds_slave_1", DataSourceUtil.createDataSource("demo_ds_slave_1", DatabaseType.MYSQL));
+        return result;
+    }
+
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingConfiguration.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingConfiguration.java
new file mode 100644
index 0000000..08a1d4d
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingConfiguration.java
@@ -0,0 +1,61 @@
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.sharding.KeyGeneratorConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.StandardShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.algorithm.PreciseModuloShardingTableAlgorithm;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class ShardingConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderTableRuleConfiguration());
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderItemTableRuleConfiguration());
+        shardingRuleConfig.getBindingTableGroups().add("t_order, t_order_item");
+        shardingRuleConfig.getBroadcastTables().add("t_address");
+        shardingRuleConfig.setDefaultDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        shardingRuleConfig.setDefaultTableShardingStrategyConfig(new StandardShardingStrategyConfiguration("order_id", new PreciseModuloShardingTableAlgorithm()));
+        return ShardingDataSourceFactory.createDataSource(createDataSourceMap(), shardingRuleConfig, new Properties());
+    }
+
+    private static TableRuleConfiguration getOrderTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order", "demo_ds_${0..1}.t_order_${0..1}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_${order_id % 2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_id", getProperties()));
+        return result;
+    }
+
+    private static TableRuleConfiguration getOrderItemTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order_item", "demo_ds_${0..1}.t_order_item_${0..1}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_item_${order_id % 2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_item_id", getProperties()));
+        return result;
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_0", DataSourceUtil.createDataSource("demo_ds_0", DatabaseType.MYSQL));
+        result.put("demo_ds_1", DataSourceUtil.createDataSource("demo_ds_1", DatabaseType.MYSQL));
+        return result;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingEncryptConfiguration.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingEncryptConfiguration.java
new file mode 100644
index 0000000..22ce741
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingEncryptConfiguration.java
@@ -0,0 +1,69 @@
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.encrypt.EncryptColumnRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptTableRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptorRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.KeyGeneratorConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class ShardingEncryptConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getTableRuleConfiguration());
+        shardingRuleConfig.setEncryptRuleConfig(getEncryptRuleConfiguration());
+        return ShardingDataSourceFactory.createDataSource(createDataSourceMap(), shardingRuleConfig, new Properties());
+    }
+
+    private static TableRuleConfiguration getTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_user", "demo_ds_${0..1}.t_user_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","t_user_${user_id % 2}"));
+        return result;
+    }
+
+    private EncryptRuleConfiguration getEncryptRuleConfiguration() {
+        Properties props = new Properties();
+        props.setProperty("aes.key.value", "123456");
+        EncryptorRuleConfiguration encryptorAES = new EncryptorRuleConfiguration("AES", props);
+        EncryptorRuleConfiguration encryptorMD5 = new EncryptorRuleConfiguration("MD5",new Properties());
+        Map<String, EncryptColumnRuleConfiguration> columns = new HashMap<>();
+        EncryptColumnRuleConfiguration columnUserName = new EncryptColumnRuleConfiguration("user_name", "user_name_cipher", "", "aes");
+        EncryptColumnRuleConfiguration columnPwd = new EncryptColumnRuleConfiguration("pwd_plain", "pwd_cipher", "", "md5");
+        columns.put("user_name",columnUserName);
+        columns.put("pwd",columnPwd);
+        EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration(columns);
+        EncryptRuleConfiguration result = new EncryptRuleConfiguration();
+        result.getEncryptors().put("aes", encryptorAES);
+        result.getEncryptors().put("md5",encryptorMD5);
+        result.getTables().put("t_user", tableConfig);
+        return result;
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_0", DataSourceUtil.createDataSource("demo_ds_0", DatabaseType.MYSQL));
+        result.put("demo_ds_1", DataSourceUtil.createDataSource("demo_ds_1", DatabaseType.MYSQL));
+        return result;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveConfiguration.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveConfiguration.java
new file mode 100644
index 0000000..c4fc944
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveConfiguration.java
@@ -0,0 +1,73 @@
+package org.apache.shardingsphere.example.config;
+
+import com.google.common.collect.Lists;
+import org.apache.shardingsphere.api.config.masterslave.MasterSlaveRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.KeyGeneratorConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.StandardShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.algorithm.PreciseModuloShardingDatabaseAlgorithm;
+import org.apache.shardingsphere.example.algorithm.PreciseModuloShardingTableAlgorithm;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.*;
+
+public class ShardingMasterSlaveConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderTableRuleConfiguration());
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderItemTableRuleConfiguration());
+        shardingRuleConfig.getBindingTableGroups().add("t_order, t_order_item");
+        shardingRuleConfig.getBroadcastTables().add("t_address");
+        shardingRuleConfig.setDefaultDatabaseShardingStrategyConfig(new StandardShardingStrategyConfiguration("user_id", new PreciseModuloShardingDatabaseAlgorithm()));
+        shardingRuleConfig.setDefaultTableShardingStrategyConfig(new StandardShardingStrategyConfiguration("order_id", new PreciseModuloShardingTableAlgorithm()));
+        shardingRuleConfig.setMasterSlaveRuleConfigs(getMasterSlaveRuleConfigurations());
+        return ShardingDataSourceFactory.createDataSource(createDataSourceMap(), shardingRuleConfig, new Properties());
+    }
+
+    private static TableRuleConfiguration getOrderTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order", "ds_${0..1}.t_order_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","ds_${user_id%2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_${order_id%2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_id", getProperties()));
+        return result;
+    }
+
+    private static TableRuleConfiguration getOrderItemTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order_item", "ds_${0..1}.t_order_item_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","ds_${user_id%2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_item_${order_id%2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_item_id", getProperties()));
+        return result;
+    }
+
+    private static List<MasterSlaveRuleConfiguration> getMasterSlaveRuleConfigurations() {
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig1 = new MasterSlaveRuleConfiguration("ds_0", "demo_ds_master_0", Arrays.asList("demo_ds_master_0_slave_0", "demo_ds_master_0_slave_1"));
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig2 = new MasterSlaveRuleConfiguration("ds_1", "demo_ds_master_1", Arrays.asList("demo_ds_master_1_slave_0", "demo_ds_master_1_slave_1"));
+        return Lists.newArrayList(masterSlaveRuleConfig1, masterSlaveRuleConfig2);
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        final Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_master_0", DataSourceUtil.createDataSource("demo_ds_master_0", DatabaseType.MYSQL));
+        result.put("demo_ds_master_0_slave_0", DataSourceUtil.createDataSource("demo_ds_master_0_slave_0", DatabaseType.MYSQL));
+        result.put("demo_ds_master_0_slave_1", DataSourceUtil.createDataSource("demo_ds_master_0_slave_1", DatabaseType.MYSQL));
+        result.put("demo_ds_master_1", DataSourceUtil.createDataSource("demo_ds_master_1", DatabaseType.MYSQL));
+        result.put("demo_ds_master_1_slave_0", DataSourceUtil.createDataSource("demo_ds_master_1_slave_0", DatabaseType.MYSQL));
+        result.put("demo_ds_master_1_slave_1", DataSourceUtil.createDataSource("demo_ds_master_1_slave_1", DatabaseType.MYSQL));
+        return result;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveEncryptConfiguration.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveEncryptConfiguration.java
new file mode 100644
index 0000000..b45a553
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveEncryptConfiguration.java
@@ -0,0 +1,77 @@
+package org.apache.shardingsphere.example.config;
+
+import com.google.common.collect.Lists;
+import org.apache.shardingsphere.api.config.encrypt.EncryptColumnRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptTableRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptorRuleConfiguration;
+import org.apache.shardingsphere.api.config.masterslave.MasterSlaveRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.*;
+
+public class ShardingMasterSlaveEncryptConfiguration implements ExampleConfiguration{
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getTableRuleConfiguration());
+        shardingRuleConfig.setMasterSlaveRuleConfigs(getMasterSlaveRuleConfigurations());
+        shardingRuleConfig.setEncryptRuleConfig(getEncryptRuleConfiguration());
+        return ShardingDataSourceFactory.createDataSource(createDataSourceMap(), shardingRuleConfig, new Properties());
+    }
+
+    private static TableRuleConfiguration getTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_user", "ds_${0..1}.t_user_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","t_user_${user_id % 2}"));
+        return result;
+    }
+
+    private static List<MasterSlaveRuleConfiguration> getMasterSlaveRuleConfigurations() {
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig1 = new MasterSlaveRuleConfiguration("ds_0", "demo_ds_master_0", Arrays.asList("demo_ds_master_0_slave_0", "demo_ds_master_0_slave_1"));
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig2 = new MasterSlaveRuleConfiguration("ds_1", "demo_ds_master_1", Arrays.asList("demo_ds_master_1_slave_0", "demo_ds_master_1_slave_1"));
+        return Lists.newArrayList(masterSlaveRuleConfig1, masterSlaveRuleConfig2);
+    }
+
+    private EncryptRuleConfiguration getEncryptRuleConfiguration() {
+        Properties props = new Properties();
+        props.setProperty("aes.key.value", "123456");
+        EncryptorRuleConfiguration encryptorAES = new EncryptorRuleConfiguration("AES", props);
+        EncryptorRuleConfiguration encryptorMD5 = new EncryptorRuleConfiguration("MD5",new Properties());
+        Map<String, EncryptColumnRuleConfiguration> columns = new HashMap<>();
+        EncryptColumnRuleConfiguration columnUserName = new EncryptColumnRuleConfiguration("user_name", "user_name_cipher", "", "aes");
+        EncryptColumnRuleConfiguration columnPwd = new EncryptColumnRuleConfiguration("pwd_plain", "pwd_cipher", "", "md5");
+        columns.put("user_name",columnUserName);
+        columns.put("pwd",columnPwd);
+        EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration(columns);
+        EncryptRuleConfiguration result = new EncryptRuleConfiguration();
+        result.getEncryptors().put("aes", encryptorAES);
+        result.getEncryptors().put("md5",encryptorMD5);
+        result.getTables().put("t_user", tableConfig);
+        return result;
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        final Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_master_0", DataSourceUtil.createDataSource("demo_ds_master_0", DatabaseType.MYSQL));
+        result.put("demo_ds_master_0_slave_0", DataSourceUtil.createDataSource("demo_ds_master_0_slave_0", DatabaseType.MYSQL));
+        result.put("demo_ds_master_0_slave_1", DataSourceUtil.createDataSource("demo_ds_master_0_slave_1", DatabaseType.MYSQL));
+        result.put("demo_ds_master_1", DataSourceUtil.createDataSource("demo_ds_master_1", DatabaseType.MYSQL));
+        result.put("demo_ds_master_1_slave_0", DataSourceUtil.createDataSource("demo_ds_master_1_slave_0", DatabaseType.MYSQL));
+        result.put("demo_ds_master_1_slave_1", DataSourceUtil.createDataSource("demo_ds_master_1_slave_1", DatabaseType.MYSQL));
+        return result;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
new file mode 100644
index 0000000..b9f1134
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.factory;
+
+import org.apache.shardingsphere.example.config.*;
+import org.apache.shardingsphere.example.type.ShardingType;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class DataSourceFactory {
+    
+    public static DataSource newInstance(final ShardingType shardingType) throws SQLException {
+        switch (shardingType) {
+            case SHARDING_ENCRYPT:
+                return new ShardingEncryptConfiguration().getDataSource();
+            case SHARDING_DATABASES_AND_TABLES:
+                return new ShardingConfiguration().getDataSource();
+            case MASTER_SLAVE:
+                return new MasterSlaveConfiguration().getDataSource();
+            case SHARDING_MASTER_SLAVE:
+                return new ShardingMasterSlaveConfiguration().getDataSource();
+            case SHARDING_MASTER_SLAVE_ENCRYPT:
+                return new ShardingMasterSlaveEncryptConfiguration().getDataSource();
+            case ENCRYPT:
+                return new EncryptConfiguration().getDataSource();
+            default:
+                throw new UnsupportedOperationException(shardingType.name());
+        }
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/YamlDataSourceFactory.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/YamlDataSourceFactory.java
new file mode 100644
index 0000000..21ebcc5
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/YamlDataSourceFactory.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.factory;
+
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.apache.shardingsphere.shardingjdbc.api.yaml.YamlEncryptDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.api.yaml.YamlMasterSlaveDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.api.yaml.YamlShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.io.File;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class YamlDataSourceFactory {
+    
+    public static DataSource newInstance(final ShardingType shardingType) throws SQLException, IOException {
+        switch (shardingType) {
+            case SHARDING_DATABASES:
+                return YamlShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-databases.yaml"));
+            case SHARDING_TABLES:
+                return YamlShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-tables.yaml"));
+            case SHARDING_DATABASES_AND_TABLES:
+                return YamlShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-databases-tables.yaml"));
+            case ENCRYPT:
+                return YamlEncryptDataSourceFactory.createDataSource(getFile("/META-INF/encrypt-only.yaml"));
+            case SHARDING_ENCRYPT:
+                return YamlShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-encrypt.yaml"));
+            case MASTER_SLAVE:
+                return YamlMasterSlaveDataSourceFactory.createDataSource(getFile("/META-INF/master-slave.yaml"));
+            case SHARDING_MASTER_SLAVE:
+                return YamlShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-master-slave.yaml"));
+            case SHARDING_MASTER_SLAVE_ENCRYPT:
+                return YamlShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-master-slave-encrypt.yaml"));
+            default:
+                throw new UnsupportedOperationException(shardingType.name());
+        }
+    }
+    
+    private static File getFile(final String fileName) {
+        return new File(Thread.currentThread().getClass().getResource(fileName).getFile());
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/encrypt-only.yaml b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/encrypt-only.yaml
new file mode 100644
index 0000000..54f5ae3
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/encrypt-only.yaml
@@ -0,0 +1,43 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSource: !!com.zaxxer.hikari.HikariDataSource
+  driverClassName: com.mysql.jdbc.Driver
+  jdbcUrl: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false
+  username: root
+  password:
+
+encryptRule:
+  encryptors:
+    encryptor_aes:
+      type: aes
+      props:
+        aes.key.value: 123456abc
+    encryptor_md5:
+      type: md5
+  tables:
+    t_user:
+      columns:
+        user_name:
+          plainColumn: user_name
+          cipherColumn: user_name_cipher
+          encryptor: encryptor_aes
+        pwd:
+          plainColumn: pwd_plain
+          cipherColumn: pwd_cipher
+          encryptor: encryptor_md5
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/master-slave.yaml b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/master-slave.yaml
new file mode 100644
index 0000000..d70f953
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/master-slave.yaml
@@ -0,0 +1,41 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_master: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master?useUnicode=true&characterEncoding=utf-8
+    username: root
+    password:
+  ds_slave0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_slave_0?useUnicode=true&characterEncoding=utf-8
+    username: root
+    password:
+  ds_slave1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_slave_1?useUnicode=true&characterEncoding=utf-8
+    username: root
+    password:
+
+masterSlaveRule:
+  name: ds_ms
+  masterDataSourceName: ds_master
+  slaveDataSourceNames:
+    - ds_slave0
+    - ds_slave1
\ No newline at end of file
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-databases-tables.yaml b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-databases-tables.yaml
new file mode 100644
index 0000000..ff22e95
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-databases-tables.yaml
@@ -0,0 +1,67 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+
+shardingRule:
+  tables:
+    t_order: 
+      actualDataNodes: ds_${0..1}.t_order_${0..1}
+      tableStrategy: 
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+        props:
+          worker.id: 123        
+    t_order_item:
+      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+        props:
+          worker.id: 123        
+  bindingTables:
+    - t_order,t_order_item
+  broadcastTables:
+    - t_address
+  defaultDatabaseStrategy:
+    inline:
+      shardingColumn: user_id
+      algorithmExpression: ds_${user_id % 2}
+  defaultTableStrategy:
+    none:
+
+props:
+  sql.show: false
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-encrypt.yaml b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-encrypt.yaml
new file mode 100644
index 0000000..803b03a
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-encrypt.yaml
@@ -0,0 +1,51 @@
+dataSources:
+  ds_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-master-slave-encrypt.yaml b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-master-slave-encrypt.yaml
new file mode 100644
index 0000000..583ca72
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-master-slave-encrypt.yaml
@@ -0,0 +1,103 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_master_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_0_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_0_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_1_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_1_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
+
+  masterSlaveRules:
+    ds_0:
+      masterDataSourceName: ds_master_0
+      slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ds_1:
+      masterDataSourceName: ds_master_1
+      slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+
+props:
+  sql.show: false
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-master-slave.yaml b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-master-slave.yaml
new file mode 100644
index 0000000..769e039
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-mysql-example/src/test/resources/META-INF/sharding-master-slave.yaml
@@ -0,0 +1,94 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_master_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_0_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_0_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_1_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+  ds_master_1_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+    username: root
+    password:
+    
+shardingRule:
+  tables:
+    t_order: 
+      actualDataNodes: ds_${0..1}.t_order_${0..1}
+      tableStrategy: 
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+        props:
+          worker.id: 123        
+    t_order_item:
+      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+        props:
+          worker.id: 123        
+  bindingTables:
+    - t_order,t_order_item
+  broadcastTables:
+    - t_address
+  defaultDatabaseStrategy:
+    inline:
+      shardingColumn: user_id
+      algorithmExpression: ds_${user_id % 2}
+  masterSlaveRules:
+    ds_0:
+      masterDataSourceName: ds_master_0
+      slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ds_1:
+      masterDataSourceName: ds_master_1
+      slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+  
+props:
+  sql.show: false
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/pom.xml b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/pom.xml
new file mode 100644
index 0000000..2eb875f
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/pom.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-example</artifactId>
+    <version>4.0.0-RC4-SNAPSHOT</version>
+  </parent>
+  <groupId>org.apache.shardingsphere.example</groupId>
+  <artifactId>sharding-raw-jdbc-postgresql-example</artifactId>
+
+  <name>AcceptanceTest::sharding::postgresql::raw-jdbc</name>
+  <!-- FIXME change it to the project's website -->
+  <url>http://www.example.com</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.11</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>config-utility</artifactId>
+      <version>${project.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>example-api</artifactId>
+      <version>${project.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>example-raw-jdbc</artifactId>
+      <version>${project.version}</version>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+      <plugins>
+        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+        <plugin>
+          <artifactId>maven-clean-plugin</artifactId>
+          <version>3.1.0</version>
+        </plugin>
+        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+        <plugin>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.8.0</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.22.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-install-plugin</artifactId>
+          <version>2.5.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <version>2.8.2</version>
+        </plugin>
+        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+        <plugin>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.7.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-project-info-reports-plugin</artifactId>
+          <version>3.0.0</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
new file mode 100644
index 0000000..ecfc8d4
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
new file mode 100644
index 0000000..3fee592
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.*;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaMasterSlaveTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
new file mode 100644
index 0000000..b6202f2
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.*;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
new file mode 100644
index 0000000..8c7cbd2
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.*;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlave {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
new file mode 100644
index 0000000..4093311
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.*;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlaveEncrypt {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaveEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
new file mode 100644
index 0000000..cb4fecc
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.*;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingTest {
+     @Test
+    public void assertCommonService() throws SQLException {
+         DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_DATABASES_AND_TABLES);
+         ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+         ExampleExecuteTemplate.run(exampleService);
+         RawJdbcAssertUtils.assertShardingTableDatabases(exampleService);
+     }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlEncryptTest.java
new file mode 100644
index 0000000..bdac810
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.*;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlMasterSlaveTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlMasterSlaveTest.java
new file mode 100644
index 0000000..940a3d3
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.*;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlMasterSlaveTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingEncryptTest.java
new file mode 100644
index 0000000..a3211ac
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.*;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..537f901
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.*;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingMasterSlaveEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaveEncrypt(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveTest.java
new file mode 100644
index 0000000..6b40b4e
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.*;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingMasterSlaveTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingTest.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingTest.java
new file mode 100644
index 0000000..34237bb
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCYamlShardingTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.*;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.YamlDataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class RawJDBCYamlShardingTest {
+    @Test
+    public void assertCommonService() throws SQLException, IOException {
+        DataSource dataSource = YamlDataSourceFactory.newInstance(ShardingType.SHARDING_DATABASES_AND_TABLES);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource),new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingTableDatabases(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/EncryptConfiguration.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/EncryptConfiguration.java
new file mode 100644
index 0000000..0029d37
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/EncryptConfiguration.java
@@ -0,0 +1,41 @@
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.encrypt.EncryptColumnRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptTableRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptorRuleConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.shardingjdbc.api.EncryptDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class EncryptConfiguration implements ExampleConfiguration {
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        return EncryptDataSourceFactory.createDataSource(DataSourceUtil.createDataSource("demo_ds", DatabaseType.POSTGRESQL), getEncryptRuleConfiguration(), new Properties());
+    }
+
+    private EncryptRuleConfiguration getEncryptRuleConfiguration() {
+        Properties props = new Properties();
+        props.setProperty("aes.key.value", "123456");
+        EncryptorRuleConfiguration encryptorAES = new EncryptorRuleConfiguration("AES", props);
+        EncryptorRuleConfiguration encryptorMD5 = new EncryptorRuleConfiguration("MD5",new Properties());
+        Map<String, EncryptColumnRuleConfiguration> columns = new HashMap<>();
+        EncryptColumnRuleConfiguration columnUserName = new EncryptColumnRuleConfiguration("user_name", "user_name_cipher", "", "aes");
+        EncryptColumnRuleConfiguration columnPwd = new EncryptColumnRuleConfiguration("pwd_plain", "pwd_cipher", "", "md5");
+        columns.put("user_name",columnUserName);
+        columns.put("pwd",columnPwd);
+        EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration(columns);
+        EncryptRuleConfiguration result = new EncryptRuleConfiguration();
+        result.getEncryptors().put("aes", encryptorAES);
+        result.getEncryptors().put("md5",encryptorMD5);
+        result.getTables().put("t_user", tableConfig);
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/MasterSlaveConfiguration.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/MasterSlaveConfiguration.java
new file mode 100644
index 0000000..09ffefe
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/MasterSlaveConfiguration.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.masterslave.MasterSlaveRuleConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.shardingjdbc.api.MasterSlaveDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public final class MasterSlaveConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig = new MasterSlaveRuleConfiguration("demo_ds_master_slave", "demo_ds_master", Arrays.asList("demo_ds_slave_0", "demo_ds_slave_1"));
+        return MasterSlaveDataSourceFactory.createDataSource(createDataSourceMap(), masterSlaveRuleConfig, new Properties());
+    }
+    
+    private Map<String, DataSource> createDataSourceMap() {
+        Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_master", DataSourceUtil.createDataSource("demo_ds_master", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_slave_0", DataSourceUtil.createDataSource("demo_ds_slave_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_slave_1", DataSourceUtil.createDataSource("demo_ds_slave_1", DatabaseType.POSTGRESQL));
+        return result;
+    }
+
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingConfiguration.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingConfiguration.java
new file mode 100644
index 0000000..2a2cbf4
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingConfiguration.java
@@ -0,0 +1,61 @@
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.sharding.KeyGeneratorConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.StandardShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.algorithm.PreciseModuloShardingTableAlgorithm;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class ShardingConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderTableRuleConfiguration());
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderItemTableRuleConfiguration());
+        shardingRuleConfig.getBindingTableGroups().add("t_order, t_order_item");
+        shardingRuleConfig.getBroadcastTables().add("t_address");
+        shardingRuleConfig.setDefaultDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        shardingRuleConfig.setDefaultTableShardingStrategyConfig(new StandardShardingStrategyConfiguration("order_id", new PreciseModuloShardingTableAlgorithm()));
+        return ShardingDataSourceFactory.createDataSource(createDataSourceMap(), shardingRuleConfig, new Properties());
+    }
+
+    private static TableRuleConfiguration getOrderTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order", "demo_ds_${0..1}.t_order_${0..1}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_${order_id % 2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_id", getProperties()));
+        return result;
+    }
+
+    private static TableRuleConfiguration getOrderItemTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order_item", "demo_ds_${0..1}.t_order_item_${0..1}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_item_${order_id % 2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_item_id", getProperties()));
+        return result;
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_0", DataSourceUtil.createDataSource("demo_ds_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_1", DataSourceUtil.createDataSource("demo_ds_1", DatabaseType.POSTGRESQL));
+        return result;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingEncryptConfiguration.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingEncryptConfiguration.java
new file mode 100644
index 0000000..01374ff
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingEncryptConfiguration.java
@@ -0,0 +1,67 @@
+package org.apache.shardingsphere.example.config;
+
+import org.apache.shardingsphere.api.config.encrypt.EncryptColumnRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptTableRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptorRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class ShardingEncryptConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getTableRuleConfiguration());
+        shardingRuleConfig.setEncryptRuleConfig(getEncryptRuleConfiguration());
+        return ShardingDataSourceFactory.createDataSource(createDataSourceMap(), shardingRuleConfig, new Properties());
+    }
+
+    private static TableRuleConfiguration getTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_user", "demo_ds_${0..1}.t_user_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "demo_ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","t_user_${user_id % 2}"));
+        return result;
+    }
+
+    private EncryptRuleConfiguration getEncryptRuleConfiguration() {
+        Properties props = new Properties();
+        props.setProperty("aes.key.value", "123456");
+        EncryptorRuleConfiguration encryptorAES = new EncryptorRuleConfiguration("AES", props);
+        EncryptorRuleConfiguration encryptorMD5 = new EncryptorRuleConfiguration("MD5",new Properties());
+        Map<String, EncryptColumnRuleConfiguration> columns = new HashMap<>();
+        EncryptColumnRuleConfiguration columnUserName = new EncryptColumnRuleConfiguration("user_name", "user_name_cipher", "", "aes");
+        EncryptColumnRuleConfiguration columnPwd = new EncryptColumnRuleConfiguration("pwd_plain", "pwd_cipher", "", "md5");
+        columns.put("user_name",columnUserName);
+        columns.put("pwd",columnPwd);
+        EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration(columns);
+        EncryptRuleConfiguration result = new EncryptRuleConfiguration();
+        result.getEncryptors().put("aes", encryptorAES);
+        result.getEncryptors().put("md5",encryptorMD5);
+        result.getTables().put("t_user", tableConfig);
+        return result;
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_0", DataSourceUtil.createDataSource("demo_ds_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_1", DataSourceUtil.createDataSource("demo_ds_1", DatabaseType.POSTGRESQL));
+        return result;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveConfiguration.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveConfiguration.java
new file mode 100644
index 0000000..11e672d
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveConfiguration.java
@@ -0,0 +1,73 @@
+package org.apache.shardingsphere.example.config;
+
+import com.google.common.collect.Lists;
+import org.apache.shardingsphere.api.config.masterslave.MasterSlaveRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.KeyGeneratorConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.StandardShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.algorithm.PreciseModuloShardingDatabaseAlgorithm;
+import org.apache.shardingsphere.example.algorithm.PreciseModuloShardingTableAlgorithm;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.*;
+
+public class ShardingMasterSlaveConfiguration implements ExampleConfiguration{
+
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderTableRuleConfiguration());
+        shardingRuleConfig.getTableRuleConfigs().add(getOrderItemTableRuleConfiguration());
+        shardingRuleConfig.getBindingTableGroups().add("t_order, t_order_item");
+        shardingRuleConfig.getBroadcastTables().add("t_address");
+        shardingRuleConfig.setDefaultDatabaseShardingStrategyConfig(new StandardShardingStrategyConfiguration("user_id", new PreciseModuloShardingDatabaseAlgorithm()));
+        shardingRuleConfig.setDefaultTableShardingStrategyConfig(new StandardShardingStrategyConfiguration("order_id", new PreciseModuloShardingTableAlgorithm()));
+        shardingRuleConfig.setMasterSlaveRuleConfigs(getMasterSlaveRuleConfigurations());
+        return ShardingDataSourceFactory.createDataSource(createDataSourceMap(), shardingRuleConfig, new Properties());
+    }
+
+    private static TableRuleConfiguration getOrderTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order", "ds_${0..1}.t_order_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","ds_${user_id%2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_${order_id%2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_id", getProperties()));
+        return result;
+    }
+
+    private static TableRuleConfiguration getOrderItemTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_order_item", "ds_${0..1}.t_order_item_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","ds_${user_id%2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("order_id","t_order_item_${order_id%2}"));
+        result.setKeyGeneratorConfig(new KeyGeneratorConfiguration("SNOWFLAKE", "order_item_id", getProperties()));
+        return result;
+    }
+
+    private static List<MasterSlaveRuleConfiguration> getMasterSlaveRuleConfigurations() {
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig1 = new MasterSlaveRuleConfiguration("ds_0", "demo_ds_master_0", Arrays.asList("demo_ds_master_0_slave_0", "demo_ds_master_0_slave_1"));
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig2 = new MasterSlaveRuleConfiguration("ds_1", "demo_ds_master_1", Arrays.asList("demo_ds_master_1_slave_0", "demo_ds_master_1_slave_1"));
+        return Lists.newArrayList(masterSlaveRuleConfig1, masterSlaveRuleConfig2);
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        final Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_master_0", DataSourceUtil.createDataSource("demo_ds_master_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_0_slave_0", DataSourceUtil.createDataSource("demo_ds_master_0_slave_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_0_slave_1", DataSourceUtil.createDataSource("demo_ds_master_0_slave_1", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_1", DataSourceUtil.createDataSource("demo_ds_master_1", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_1_slave_0", DataSourceUtil.createDataSource("demo_ds_master_1_slave_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_1_slave_1", DataSourceUtil.createDataSource("demo_ds_master_1_slave_1", DatabaseType.POSTGRESQL));
+        return result;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveEncryptConfiguration.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveEncryptConfiguration.java
new file mode 100644
index 0000000..1c6152e
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/config/ShardingMasterSlaveEncryptConfiguration.java
@@ -0,0 +1,77 @@
+package org.apache.shardingsphere.example.config;
+
+import com.google.common.collect.Lists;
+import org.apache.shardingsphere.api.config.encrypt.EncryptColumnRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptTableRuleConfiguration;
+import org.apache.shardingsphere.api.config.encrypt.EncryptorRuleConfiguration;
+import org.apache.shardingsphere.api.config.masterslave.MasterSlaveRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.ShardingRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration;
+import org.apache.shardingsphere.api.config.sharding.strategy.InlineShardingStrategyConfiguration;
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+import java.util.*;
+
+public class ShardingMasterSlaveEncryptConfiguration implements ExampleConfiguration{
+    @Override
+    public DataSource getDataSource() throws SQLException {
+        ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
+        shardingRuleConfig.getTableRuleConfigs().add(getTableRuleConfiguration());
+        shardingRuleConfig.setMasterSlaveRuleConfigs(getMasterSlaveRuleConfigurations());
+        shardingRuleConfig.setEncryptRuleConfig(getEncryptRuleConfiguration());
+        return ShardingDataSourceFactory.createDataSource(createDataSourceMap(), shardingRuleConfig, new Properties());
+    }
+
+    private static TableRuleConfiguration getTableRuleConfiguration() {
+        TableRuleConfiguration result = new TableRuleConfiguration("t_user", "ds_${0..1}.t_user_${[0, 1]}");
+        result.setDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "ds_${user_id % 2}"));
+        result.setTableShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id","t_user_${user_id % 2}"));
+        return result;
+    }
+
+    private static List<MasterSlaveRuleConfiguration> getMasterSlaveRuleConfigurations() {
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig1 = new MasterSlaveRuleConfiguration("ds_0", "demo_ds_master_0", Arrays.asList("demo_ds_master_0_slave_0", "demo_ds_master_0_slave_1"));
+        MasterSlaveRuleConfiguration masterSlaveRuleConfig2 = new MasterSlaveRuleConfiguration("ds_1", "demo_ds_master_1", Arrays.asList("demo_ds_master_1_slave_0", "demo_ds_master_1_slave_1"));
+        return Lists.newArrayList(masterSlaveRuleConfig1, masterSlaveRuleConfig2);
+    }
+
+    private EncryptRuleConfiguration getEncryptRuleConfiguration() {
+        Properties props = new Properties();
+        props.setProperty("aes.key.value", "123456");
+        EncryptorRuleConfiguration encryptorAES = new EncryptorRuleConfiguration("AES", props);
+        EncryptorRuleConfiguration encryptorMD5 = new EncryptorRuleConfiguration("MD5",new Properties());
+        Map<String, EncryptColumnRuleConfiguration> columns = new HashMap<>();
+        EncryptColumnRuleConfiguration columnUserName = new EncryptColumnRuleConfiguration("user_name", "user_name_cipher", "", "aes");
+        EncryptColumnRuleConfiguration columnPwd = new EncryptColumnRuleConfiguration("pwd_plain", "pwd_cipher", "", "md5");
+        columns.put("user_name",columnUserName);
+        columns.put("pwd",columnPwd);
+        EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration(columns);
+        EncryptRuleConfiguration result = new EncryptRuleConfiguration();
+        result.getEncryptors().put("aes", encryptorAES);
+        result.getEncryptors().put("md5",encryptorMD5);
+        result.getTables().put("t_user", tableConfig);
+        return result;
+    }
+
+    private static Map<String, DataSource> createDataSourceMap() {
+        final Map<String, DataSource> result = new HashMap<>();
+        result.put("demo_ds_master_0", DataSourceUtil.createDataSource("demo_ds_master_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_0_slave_0", DataSourceUtil.createDataSource("demo_ds_master_0_slave_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_0_slave_1", DataSourceUtil.createDataSource("demo_ds_master_0_slave_1", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_1", DataSourceUtil.createDataSource("demo_ds_master_1", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_1_slave_0", DataSourceUtil.createDataSource("demo_ds_master_1_slave_0", DatabaseType.POSTGRESQL));
+        result.put("demo_ds_master_1_slave_1", DataSourceUtil.createDataSource("demo_ds_master_1_slave_1", DatabaseType.POSTGRESQL));
+        return result;
+    }
+
+    private static Properties getProperties() {
+        Properties result = new Properties();
+        result.setProperty("worker.id", "123");
+        return result;
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
new file mode 100644
index 0000000..b9f1134
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.factory;
+
+import org.apache.shardingsphere.example.config.*;
+import org.apache.shardingsphere.example.type.ShardingType;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class DataSourceFactory {
+    
+    public static DataSource newInstance(final ShardingType shardingType) throws SQLException {
+        switch (shardingType) {
+            case SHARDING_ENCRYPT:
+                return new ShardingEncryptConfiguration().getDataSource();
+            case SHARDING_DATABASES_AND_TABLES:
+                return new ShardingConfiguration().getDataSource();
+            case MASTER_SLAVE:
+                return new MasterSlaveConfiguration().getDataSource();
+            case SHARDING_MASTER_SLAVE:
+                return new ShardingMasterSlaveConfiguration().getDataSource();
+            case SHARDING_MASTER_SLAVE_ENCRYPT:
+                return new ShardingMasterSlaveEncryptConfiguration().getDataSource();
+            case ENCRYPT:
+                return new EncryptConfiguration().getDataSource();
+            default:
+                throw new UnsupportedOperationException(shardingType.name());
+        }
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/YamlDataSourceFactory.java b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/YamlDataSourceFactory.java
new file mode 100644
index 0000000..21ebcc5
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/YamlDataSourceFactory.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.factory;
+
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.apache.shardingsphere.shardingjdbc.api.yaml.YamlEncryptDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.api.yaml.YamlMasterSlaveDataSourceFactory;
+import org.apache.shardingsphere.shardingjdbc.api.yaml.YamlShardingDataSourceFactory;
+
+import javax.sql.DataSource;
+import java.io.File;
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class YamlDataSourceFactory {
+    
+    public static DataSource newInstance(final ShardingType shardingType) throws SQLException, IOException {
+        switch (shardingType) {
+            case SHARDING_DATABASES:
+                return YamlShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-databases.yaml"));
+            case SHARDING_TABLES:
+                return YamlShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-tables.yaml"));
+            case SHARDING_DATABASES_AND_TABLES:
+                return YamlShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-databases-tables.yaml"));
+            case ENCRYPT:
+                return YamlEncryptDataSourceFactory.createDataSource(getFile("/META-INF/encrypt-only.yaml"));
+            case SHARDING_ENCRYPT:
+                return YamlShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-encrypt.yaml"));
+            case MASTER_SLAVE:
+                return YamlMasterSlaveDataSourceFactory.createDataSource(getFile("/META-INF/master-slave.yaml"));
+            case SHARDING_MASTER_SLAVE:
+                return YamlShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-master-slave.yaml"));
+            case SHARDING_MASTER_SLAVE_ENCRYPT:
+                return YamlShardingDataSourceFactory.createDataSource(getFile("/META-INF/sharding-master-slave-encrypt.yaml"));
+            default:
+                throw new UnsupportedOperationException(shardingType.name());
+        }
+    }
+    
+    private static File getFile(final String fileName) {
+        return new File(Thread.currentThread().getClass().getResource(fileName).getFile());
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/encrypt-only.yaml b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/encrypt-only.yaml
new file mode 100644
index 0000000..4b7947b
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/encrypt-only.yaml
@@ -0,0 +1,43 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSource: !!com.zaxxer.hikari.HikariDataSource
+  driverClassName: org.postgresql.Driver
+  jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds
+  username: postgres
+  password:
+
+encryptRule:
+  encryptors:
+    encryptor_aes:
+      type: aes
+      props:
+        aes.key.value: 123456abc
+    encryptor_md5:
+      type: md5
+  tables:
+    t_user:
+      columns:
+        user_name:
+          plainColumn: user_name
+          cipherColumn: user_name_cipher
+          encryptor: encryptor_aes
+        pwd:
+          plainColumn: pwd_plain
+          cipherColumn: pwd_cipher
+          encryptor: encryptor_md5
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/master-slave.yaml b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/master-slave.yaml
new file mode 100644
index 0000000..30780b1
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/master-slave.yaml
@@ -0,0 +1,41 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_master: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master
+    username: postgres
+    password:
+  ds_slave0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_slave_0
+    username: postgres
+    password:
+  ds_slave1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_slave_1
+    username: postgres
+    password:
+
+masterSlaveRule:
+  name: ds_ms
+  masterDataSourceName: ds_master
+  slaveDataSourceNames:
+    - ds_slave0
+    - ds_slave1
\ No newline at end of file
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-databases-tables.yaml b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-databases-tables.yaml
new file mode 100644
index 0000000..6abb47c
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-databases-tables.yaml
@@ -0,0 +1,67 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0
+    username: postgres
+    password:
+  ds_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1
+    username: postgres
+    password:
+
+shardingRule:
+  tables:
+    t_order: 
+      actualDataNodes: ds_${0..1}.t_order_${0..1}
+      tableStrategy: 
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+        props:
+          worker.id: 123        
+    t_order_item:
+      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+        props:
+          worker.id: 123        
+  bindingTables:
+    - t_order,t_order_item
+  broadcastTables:
+    - t_address
+  defaultDatabaseStrategy:
+    inline:
+      shardingColumn: user_id
+      algorithmExpression: ds_${user_id % 2}
+  defaultTableStrategy:
+    none:
+
+props:
+  sql.show: false
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-encrypt.yaml b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-encrypt.yaml
new file mode 100644
index 0000000..fe58a83
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-encrypt.yaml
@@ -0,0 +1,51 @@
+dataSources:
+  ds_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0
+    username: postgres
+    password:
+  ds_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1
+    username: postgres
+    password:
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-master-slave-encrypt.yaml b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-master-slave-encrypt.yaml
new file mode 100644
index 0000000..1a5e54a
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-master-slave-encrypt.yaml
@@ -0,0 +1,103 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_master_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0
+    username: postgres
+    password:
+  ds_master_0_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0
+    username: postgres
+    password:
+  ds_master_0_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1
+    username: postgres
+    password:
+  ds_master_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1
+    username: postgres
+    password:
+  ds_master_1_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0
+    username: postgres
+    password:
+  ds_master_1_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1
+    username: postgres
+    password:
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
+
+  masterSlaveRules:
+    ds_0:
+      masterDataSourceName: ds_master_0
+      slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ds_1:
+      masterDataSourceName: ds_master_1
+      slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+
+props:
+  sql.show: false
diff --git a/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-master-slave.yaml b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-master-slave.yaml
new file mode 100644
index 0000000..6e1964a
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-raw-jdbc-postgresql-example/src/test/resources/META-INF/sharding-master-slave.yaml
@@ -0,0 +1,94 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+dataSources:
+  ds_master_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0
+    username: postgres
+    password:
+  ds_master_0_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0
+    username: postgres
+    password:
+  ds_master_0_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1
+    username: postgres
+    password:
+  ds_master_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1
+    username: postgres
+    password:
+  ds_master_1_slave_0: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0
+    username: postgres
+    password:
+  ds_master_1_slave_1: !!com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.postgresql.Driver
+    jdbcUrl: jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1
+    username: postgres
+    password:
+    
+shardingRule:
+  tables:
+    t_order: 
+      actualDataNodes: ds_${0..1}.t_order_${0..1}
+      tableStrategy: 
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+        props:
+          worker.id: 123        
+    t_order_item:
+      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+        props:
+          worker.id: 123        
+  bindingTables:
+    - t_order,t_order_item
+  broadcastTables:
+    - t_address
+  defaultDatabaseStrategy:
+    inline:
+      shardingColumn: user_id
+      algorithmExpression: ds_${user_id % 2}
+  masterSlaveRules:
+    ds_0:
+      masterDataSourceName: ds_master_0
+      slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ds_1:
+      masterDataSourceName: ds_master_1
+      slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+  
+props:
+  sql.show: false
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/pom.xml b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/pom.xml
new file mode 100644
index 0000000..ce05dbc
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/pom.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>sharding-example</artifactId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <artifactId>sharding-spring-boot-mybatis-mysql-example</artifactId>
+    <name>AcceptanceTest::sharding::mysql::spring-boot-mybatis</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-spring-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-jdbc-spring-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootEncryptTest.java
new file mode 100644
index 0000000..4a8c407
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("encrypt")
+public class SpringBootEncryptTest {
+
+    @Resource(name = "encrypt")
+    private ExampleService exampleService;
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootMasterSlaveTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootMasterSlaveTest.java
new file mode 100644
index 0000000..16c8b4a
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootMasterSlaveTest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("master-slave")
+public class SpringBootMasterSlaveTest {
+    
+    @Autowired
+    ExampleService exampleService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceMasterSlaveResult(exampleService);
+    }
+}
+
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingDatabasesTablesTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingDatabasesTablesTest.java
new file mode 100644
index 0000000..59fe568
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingDatabasesTablesTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-databases-tables")
+public class SpringBootShardingDatabasesTablesTest {
+    
+    @Autowired
+    private ExampleService exampleService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceShardingDatabaseAndTableResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingDatabasesTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingDatabasesTest.java
new file mode 100644
index 0000000..ccbac8c
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingDatabasesTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-databases")
+public class SpringBootShardingDatabasesTest {
+    
+    @Autowired
+    private ExampleService exampleService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceShardingDatabaseResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingEncryptTest.java
new file mode 100644
index 0000000..d9cb1bf
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-encrypt")
+public class SpringBootShardingEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingMasterSlaveEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..64d611d
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-master-slave-encrypt")
+public class SpringBootShardingMasterSlaveEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingMasterSlaveTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingMasterSlaveTest.java
new file mode 100644
index 0000000..6985ba0
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingMasterSlaveTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-master-slave")
+public class SpringBootShardingMasterSlaveTest {
+    
+    @Autowired
+    ExampleService exampleService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceMasterSlaveResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingTablesTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingTablesTest.java
new file mode 100644
index 0000000..d242419
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootShardingTablesTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-tables")
+public class SpringBootShardingTablesTest {
+    
+    @Autowired
+    private ExampleService exampleService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceShardingTableResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootTestMain.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootTestMain.java
new file mode 100644
index 0000000..2d268b1
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootTestMain.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
+import org.springframework.context.annotation.ComponentScan;
+
+@ComponentScan("org.apache.shardingsphere.example.core.mybatis")
+@MapperScan(basePackages = "org.apache.shardingsphere.example.core.mybatis.repository")
+@SpringBootApplication(exclude = JtaAutoConfiguration.class)
+public class SpringBootTestMain {
+    
+    public static void main(final String[] args) {
+        SpringApplication.run(SpringBootTestMain.class, args);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/META-INF/mybatis-config.xml b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/META-INF/mybatis-config.xml
new file mode 100644
index 0000000..e450f2f
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/META-INF/mybatis-config.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <mappers>
+        <mapper resource="META-INF/mappers/mysql/AddressMapper.xml"/>
+        <mapper resource="META-INF/mappers/mysql/OrderMapper.xml"/>
+        <mapper resource="META-INF/mappers/mysql/OrderItemMapper.xml"/>
+        <mapper resource="META-INF/mappers/mysql/UserMapper.xml"/>
+    </mappers>
+</configuration>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-encrypt.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-encrypt.properties
new file mode 100644
index 0000000..fe2d315
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-encrypt.properties
@@ -0,0 +1,17 @@
+spring.shardingsphere.datasource.names=ds
+
+spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds.jdbc-url=jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds.username=root
+spring.shardingsphere.datasource.ds.password=
+
+spring.shardingsphere.encrypt.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.encrypt.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.encrypt.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.encryptor=encryptor_md5
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-master-slave.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-master-slave.properties
new file mode 100644
index 0000000..18e149b
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-master-slave.properties
@@ -0,0 +1,26 @@
+spring.shardingsphere.datasource.names=ds_master,ds_slave_0,ds_slave_1
+
+spring.shardingsphere.datasource.ds_master.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master.username=root
+spring.shardingsphere.datasource.ds_master.password=
+
+spring.shardingsphere.datasource.ds_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_slave_0.username=root
+spring.shardingsphere.datasource.ds_slave_0.password=
+
+spring.shardingsphere.datasource.ds_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_slave_1.username=root
+spring.shardingsphere.datasource.ds_slave_1.password=
+
+spring.shardingsphere.masterslave.load-balance-algorithm-type=round_robin
+spring.shardingsphere.masterslave.name=ds_ms
+spring.shardingsphere.masterslave.master-data-source-name=ds_master
+spring.shardingsphere.masterslave.slave-data-source-names=ds_slave_0,ds_slave_1
+
+spring.shardingsphere.props.sql.show=true
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-databases-tables.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-databases-tables.properties
new file mode 100644
index 0000000..40ac107
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-databases-tables.properties
@@ -0,0 +1,31 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_0.username=root
+spring.shardingsphere.datasource.ds_0.password=
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_1.username=root
+spring.shardingsphere.datasource.ds_1.password=
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-databases.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-databases.properties
new file mode 100644
index 0000000..1a33cec
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-databases.properties
@@ -0,0 +1,28 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_0.username=root
+spring.shardingsphere.datasource.ds_0.password=
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_1.username=root
+spring.shardingsphere.datasource.ds_1.password=
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-encrypt.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-encrypt.properties
new file mode 100644
index 0000000..36dec67
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-encrypt.properties
@@ -0,0 +1,32 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_0.username=root
+spring.shardingsphere.datasource.ds_0.password=
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_1.username=root
+spring.shardingsphere.datasource.ds_1.password=
+
+spring.shardingsphere.sharding.tables.t_user.actual-data-nodes=ds_$->{0..1}.t_user_$->{0..1}
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.algorithm-expression=t_user_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.key-generator.column=user_id
+spring.shardingsphere.sharding.tables.t_user.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_user.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.encryptor=encryptor_md5
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave-encrypt.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave-encrypt.properties
new file mode 100644
index 0000000..5a61901
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave-encrypt.properties
@@ -0,0 +1,59 @@
+spring.shardingsphere.datasource.names=ds_master_0,ds_master_1,ds_master_0_slave_0,ds_master_0_slave_1,ds_master_1_slave_0,ds_master_1_slave_1
+
+spring.shardingsphere.datasource.ds_master_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0.username=root
+spring.shardingsphere.datasource.ds_master_0.password=
+
+spring.shardingsphere.datasource.ds_master_0_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0_slave_0.username=root
+spring.shardingsphere.datasource.ds_master_0_slave_0.password=
+spring.shardingsphere.datasource.ds_master_0_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0_slave_1.username=root
+spring.shardingsphere.datasource.ds_master_0_slave_1.password=
+
+spring.shardingsphere.datasource.ds_master_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1.username=root
+spring.shardingsphere.datasource.ds_master_1.password=
+
+spring.shardingsphere.datasource.ds_master_1_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1_slave_0.username=root
+spring.shardingsphere.datasource.ds_master_1_slave_0.password=
+spring.shardingsphere.datasource.ds_master_1_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1_slave_1.username=root
+spring.shardingsphere.datasource.ds_master_1_slave_1.password=
+
+spring.shardingsphere.sharding.tables.t_user.actual-data-nodes=ds_$->{0..1}.t_user_$->{0..1}
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.algorithm-expression=t_user_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.key-generator.column=user_id
+spring.shardingsphere.sharding.tables.t_user.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_user.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.master-slave-rules.ds_0.master-data-source-name=ds_master_0
+spring.shardingsphere.sharding.master-slave-rules.ds_0.slave-data-source-names=ds_master_0_slave_0, ds_master_0_slave_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.master-data-source-name=ds_master_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.slave-data-source-names=ds_master_1_slave_0, ds_master_1_slave_1
+
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.encryptor=encryptor_md5
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave.properties
new file mode 100644
index 0000000..fbb71b0
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave.properties
@@ -0,0 +1,58 @@
+spring.shardingsphere.datasource.names=ds_master_0,ds_master_1,ds_master_0_slave_0,ds_master_0_slave_1,ds_master_1_slave_0,ds_master_1_slave_1
+
+spring.shardingsphere.datasource.ds_master_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0.username=root
+spring.shardingsphere.datasource.ds_master_0.password=
+
+spring.shardingsphere.datasource.ds_master_0_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0_slave_0.username=root
+spring.shardingsphere.datasource.ds_master_0_slave_0.password=
+spring.shardingsphere.datasource.ds_master_0_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_0_slave_1.username=root
+spring.shardingsphere.datasource.ds_master_0_slave_1.password=
+
+spring.shardingsphere.datasource.ds_master_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1.username=root
+spring.shardingsphere.datasource.ds_master_1.password=
+
+spring.shardingsphere.datasource.ds_master_1_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_0.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_0.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1_slave_0.username=root
+spring.shardingsphere.datasource.ds_master_1_slave_0.password=
+spring.shardingsphere.datasource.ds_master_1_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_1.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_1.jdbc-url=jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds_master_1_slave_1.username=root
+spring.shardingsphere.datasource.ds_master_1_slave_1.password=
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.master-slave-rules.ds_0.master-data-source-name=ds_master_0
+spring.shardingsphere.sharding.master-slave-rules.ds_0.slave-data-source-names=ds_master_0_slave_0, ds_master_0_slave_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.master-data-source-name=ds_master_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.slave-data-source-names=ds_master_1_slave_0, ds_master_1_slave_1
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-tables.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-tables.properties
new file mode 100644
index 0000000..54debe1
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-tables.properties
@@ -0,0 +1,23 @@
+spring.shardingsphere.datasource.names=ds
+
+spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds.driver-class-name=com.mysql.jdbc.Driver
+spring.shardingsphere.datasource.ds.jdbc-url=jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
+spring.shardingsphere.datasource.ds.username=root
+spring.shardingsphere.datasource.ds.password=
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application.properties
new file mode 100644
index 0000000..8d8a1f9
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/application.properties
@@ -0,0 +1,7 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+
+#spring.profiles.active=sharding-databases
+#spring.profiles.active=sharding-tables
+#spring.profiles.active=sharding-databases-tables
+spring.profiles.active=master-slave
+#spring.profiles.active=sharding-master-slave
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/logback.xml b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/logback.xml
new file mode 100644
index 0000000..d2031fe
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-mysql-example/src/test/resources/logback.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <property name="log.context.name" value="sharding-jdbc-spring-namespace-mybatis-example" />
+    <property name="log.charset" value="UTF-8" />
+    <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n" />
+    <contextName>${log.context.name}</contextName>
+    
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder charset="${log.charset}">
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+    <root>
+        <level value="INFO" />
+        <appender-ref ref="STDOUT" />
+    </root>
+</configuration>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/pom.xml b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/pom.xml
new file mode 100644
index 0000000..3f0845b
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/pom.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>sharding-example</artifactId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <artifactId>sharding-spring-boot-mybatis-postgresql-example</artifactId>
+    <name>AcceptanceTest::sharding::postgresql::spring-boot-mybatis</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-spring-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-jdbc-spring-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <version>42.2.5</version>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLEncryptTest.java
new file mode 100644
index 0000000..070fc0c
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootPostgreSQLTestMain.class)
+@ActiveProfiles("encrypt")
+public class SpringBootPostgreSQLEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLMasterSlaveTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLMasterSlaveTest.java
new file mode 100644
index 0000000..6ae9fd1
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLMasterSlaveTest.java
@@ -0,0 +1,45 @@
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootPostgreSQLTestMain.class)
+@ActiveProfiles("master-slave")
+public class SpringBootPostgreSQLMasterSlaveTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingDatabasesTablesTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingDatabasesTablesTest.java
new file mode 100644
index 0000000..0c75303
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingDatabasesTablesTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootPostgreSQLTestMain.class)
+@ActiveProfiles("sharding-databases-tables")
+public class SpringBootPostgreSQLShardingDatabasesTablesTest {
+    
+    @Autowired
+    private ExampleService exampleService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceShardingDatabaseAndTableResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingDatabasesTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingDatabasesTest.java
new file mode 100644
index 0000000..9d71e59
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingDatabasesTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootPostgreSQLTestMain.class)
+@ActiveProfiles("sharding-databases")
+public class SpringBootPostgreSQLShardingDatabasesTest {
+    
+    @Autowired
+    private ExampleService exampleService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceShardingDatabaseResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingEncryptTest.java
new file mode 100644
index 0000000..840b959
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootPostgreSQLTestMain.class)
+@ActiveProfiles("sharding-encrypt")
+public class SpringBootPostgreSQLShardingEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingMasterSlaveEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..ca4281a
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootPostgreSQLTestMain.class)
+@ActiveProfiles("sharding-master-slave-encrypt")
+public class SpringBootPostgreSQLShardingMasterSlaveEncryptTest {
+
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingMasterSlaveTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingMasterSlaveTest.java
new file mode 100644
index 0000000..cbd7cd5
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingMasterSlaveTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootPostgreSQLTestMain.class)
+@ActiveProfiles("sharding-master-slave")
+public class SpringBootPostgreSQLShardingMasterSlaveTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingTablesTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingTablesTest.java
new file mode 100644
index 0000000..81f028c
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLShardingTablesTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootPostgreSQLTestMain.class)
+@ActiveProfiles("sharding-tables")
+public class SpringBootPostgreSQLShardingTablesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingTableResult(commonService);
+    }
+    
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLTestMain.java b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLTestMain.java
new file mode 100644
index 0000000..70a1e2d
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/sharding/spring/boot/mybatis/SpringBootPostgreSQLTestMain.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.sharding.spring.boot.mybatis;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
+import org.springframework.context.annotation.ComponentScan;
+
+@ComponentScan("org.apache.shardingsphere.example.core.mybatis")
+@MapperScan(basePackages = "org.apache.shardingsphere.example.core.mybatis.repository")
+@SpringBootApplication(exclude = JtaAutoConfiguration.class)
+public class SpringBootPostgreSQLTestMain {
+    
+    public static void main(final String[] args) {
+        SpringApplication.run(SpringBootPostgreSQLTestMain.class, args);
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/META-INF/mybatis-config.xml b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/META-INF/mybatis-config.xml
new file mode 100644
index 0000000..730d2f1
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/META-INF/mybatis-config.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <mappers>
+        <mapper resource="META-INF/mappers/postgresql/AddressMapper.xml"/>
+        <mapper resource="META-INF/mappers/postgresql/OrderMapper.xml"/>
+        <mapper resource="META-INF/mappers/postgresql/OrderItemMapper.xml"/>
+        <mapper resource="META-INF/mappers/postgresql/UserMapper.xml"/>
+    </mappers>
+</configuration>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-encrypt.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-encrypt.properties
new file mode 100644
index 0000000..50196e3
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-encrypt.properties
@@ -0,0 +1,17 @@
+spring.shardingsphere.datasource.names=ds
+
+spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds
+spring.shardingsphere.datasource.ds.username=postgres
+spring.shardingsphere.datasource.ds.password=
+
+spring.shardingsphere.encrypt.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.encrypt.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.encrypt.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.encrypt.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.encrypt.tables.t_user.columns.pwd.encryptor=encryptor_md5
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave.properties
new file mode 100644
index 0000000..143b847
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave.properties
@@ -0,0 +1,26 @@
+spring.shardingsphere.datasource.names=ds_master,ds_slave_0,ds_slave_1
+
+spring.shardingsphere.datasource.ds_master.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master
+spring.shardingsphere.datasource.ds_master.username=postgres
+spring.shardingsphere.datasource.ds_master.password=
+
+spring.shardingsphere.datasource.ds_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_slave_0
+spring.shardingsphere.datasource.ds_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_slave_0.password=
+
+spring.shardingsphere.datasource.ds_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_slave_1
+spring.shardingsphere.datasource.ds_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_slave_1.password=
+
+spring.shardingsphere.masterslave.load-balance-algorithm-type=round_robin
+spring.shardingsphere.masterslave.name=ds_ms
+spring.shardingsphere.masterslave.master-data-source-name=ds_master
+spring.shardingsphere.masterslave.slave-data-source-names=ds_slave_0,ds_slave_1
+
+spring.shardingsphere.props.sql.show=true
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-databases-tables.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-databases-tables.properties
new file mode 100644
index 0000000..a0c41a4
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-databases-tables.properties
@@ -0,0 +1,32 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0
+spring.shardingsphere.datasource.ds_0.username=postgres
+spring.shardingsphere.datasource.ds_0.password=
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1
+spring.shardingsphere.datasource.ds_1.username=postgres
+spring.shardingsphere.datasource.ds_1.password=
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.props.sql.show=true
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-databases.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-databases.properties
new file mode 100644
index 0000000..2c9db43
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-databases.properties
@@ -0,0 +1,29 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0
+spring.shardingsphere.datasource.ds_0.username=postgres
+spring.shardingsphere.datasource.ds_0.password=
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1
+spring.shardingsphere.datasource.ds_1.username=postgres
+spring.shardingsphere.datasource.ds_1.password=
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.props.sql.show=true
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-encrypt.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-encrypt.properties
new file mode 100644
index 0000000..0270cd2
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-encrypt.properties
@@ -0,0 +1,32 @@
+spring.shardingsphere.datasource.names=ds_0,ds_1
+
+spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0
+spring.shardingsphere.datasource.ds_0.username=postgres
+spring.shardingsphere.datasource.ds_0.password=
+
+spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1
+spring.shardingsphere.datasource.ds_1.username=postgres
+spring.shardingsphere.datasource.ds_1.password=
+
+spring.shardingsphere.sharding.tables.t_user.actual-data-nodes=ds_$->{0..1}.t_user_$->{0..1}
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.algorithm-expression=t_user_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.key-generator.column=user_id
+spring.shardingsphere.sharding.tables.t_user.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_user.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.encryptor=encryptor_md5
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-master-slave-encrypt.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-master-slave-encrypt.properties
new file mode 100644
index 0000000..6c57ff5
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-master-slave-encrypt.properties
@@ -0,0 +1,59 @@
+spring.shardingsphere.datasource.names=ds_master_0,ds_master_1,ds_master_0_slave_0,ds_master_0_slave_1,ds_master_1_slave_0,ds_master_1_slave_1
+
+spring.shardingsphere.datasource.ds_master_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0
+spring.shardingsphere.datasource.ds_master_0.username=postgres
+spring.shardingsphere.datasource.ds_master_0.password=
+
+spring.shardingsphere.datasource.ds_master_0_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0
+spring.shardingsphere.datasource.ds_master_0_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_master_0_slave_0.password=
+spring.shardingsphere.datasource.ds_master_0_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1
+spring.shardingsphere.datasource.ds_master_0_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_master_0_slave_1.password=
+
+spring.shardingsphere.datasource.ds_master_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1
+spring.shardingsphere.datasource.ds_master_1.username=postgres
+spring.shardingsphere.datasource.ds_master_1.password=
+
+spring.shardingsphere.datasource.ds_master_1_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0
+spring.shardingsphere.datasource.ds_master_1_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_master_1_slave_0.password=
+spring.shardingsphere.datasource.ds_master_1_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1
+spring.shardingsphere.datasource.ds_master_1_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_master_1_slave_1.password=
+
+spring.shardingsphere.sharding.tables.t_user.actual-data-nodes=ds_$->{0..1}.t_user_$->{0..1}
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.algorithm-expression=t_user_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.tables.t_user.key-generator.column=user_id
+spring.shardingsphere.sharding.tables.t_user.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_user.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.master-slave-rules.ds_0.master-data-source-name=ds_master_0
+spring.shardingsphere.sharding.master-slave-rules.ds_0.slave-data-source-names=ds_master_0_slave_0, ds_master_0_slave_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.master-data-source-name=ds_master_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.slave-data-source-names=ds_master_1_slave_0, ds_master_1_slave_1
+
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.type=aes
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.props.aes.key.value=123456
+spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_md5.type=md5
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.plainColumn=user_name
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.encryptor=encryptor_aes
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.plainColumn=pwd_plain
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
+spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.encryptor=encryptor_md5
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-master-slave.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-master-slave.properties
new file mode 100644
index 0000000..280b42a
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-master-slave.properties
@@ -0,0 +1,58 @@
+spring.shardingsphere.datasource.names=ds_master_0,ds_master_1,ds_master_0_slave_0,ds_master_0_slave_1,ds_master_1_slave_0,ds_master_1_slave_1
+
+spring.shardingsphere.datasource.ds_master_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0
+spring.shardingsphere.datasource.ds_master_0.username=postgres
+spring.shardingsphere.datasource.ds_master_0.password=
+
+spring.shardingsphere.datasource.ds_master_0_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0
+spring.shardingsphere.datasource.ds_master_0_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_master_0_slave_0.password=
+spring.shardingsphere.datasource.ds_master_0_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_0_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_0_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1
+spring.shardingsphere.datasource.ds_master_0_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_master_0_slave_1.password=
+
+spring.shardingsphere.datasource.ds_master_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1
+spring.shardingsphere.datasource.ds_master_1.username=postgres
+spring.shardingsphere.datasource.ds_master_1.password=
+
+spring.shardingsphere.datasource.ds_master_1_slave_0.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_0.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0
+spring.shardingsphere.datasource.ds_master_1_slave_0.username=postgres
+spring.shardingsphere.datasource.ds_master_1_slave_0.password=
+spring.shardingsphere.datasource.ds_master_1_slave_1.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds_master_1_slave_1.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds_master_1_slave_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1
+spring.shardingsphere.datasource.ds_master_1_slave_1.username=postgres
+spring.shardingsphere.datasource.ds_master_1_slave_1.password=
+
+spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
+spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds_$->{0..1}.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds_$->{0..1}.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.master-slave-rules.ds_0.master-data-source-name=ds_master_0
+spring.shardingsphere.sharding.master-slave-rules.ds_0.slave-data-source-names=ds_master_0_slave_0, ds_master_0_slave_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.master-data-source-name=ds_master_1
+spring.shardingsphere.sharding.master-slave-rules.ds_1.slave-data-source-names=ds_master_1_slave_0, ds_master_1_slave_1
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-tables.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-tables.properties
new file mode 100644
index 0000000..1af3e82
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-tables.properties
@@ -0,0 +1,25 @@
+spring.shardingsphere.datasource.names=ds
+
+spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
+spring.shardingsphere.datasource.ds.driver-class-name=org.postgresql.Driver
+spring.shardingsphere.datasource.ds.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds
+spring.shardingsphere.datasource.ds.username=postgres
+spring.shardingsphere.datasource.ds.password=
+
+spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds.t_order_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id
+spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=123
+spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds.t_order_item_$->{0..1}
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
+spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_item_id
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE
+spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id=123
+
+spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
+spring.shardingsphere.sharding.broadcast-tables=t_address
+
+#spring.shardingsphere.props.sql.show=true
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application.properties b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application.properties
new file mode 100644
index 0000000..8157250
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/application.properties
@@ -0,0 +1,7 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+#logging.level.org.apache.shardingsphere.example.core.mybatis=debug,Console
+#spring.profiles.active=sharding-databases
+#spring.profiles.active=sharding-tables
+#spring.profiles.active=sharding-databases-tables
+#spring.profiles.active=master-slave
+#spring.profiles.active=sharding-master-slave
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/logback.xml b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/logback.xml
new file mode 100644
index 0000000..d2031fe
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-boot-mybatis-postgresql-example/src/test/resources/logback.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <property name="log.context.name" value="sharding-jdbc-spring-namespace-mybatis-example" />
+    <property name="log.charset" value="UTF-8" />
+    <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n" />
+    <contextName>${log.context.name}</contextName>
+    
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder charset="${log.charset}">
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+    <root>
+        <level value="INFO" />
+        <appender-ref ref="STDOUT" />
+    </root>
+</configuration>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/pom.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/pom.xml
new file mode 100644
index 0000000..f6598c8
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/pom.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-example</artifactId>
+    <version>4.0.0-RC4-SNAPSHOT</version>
+  </parent>
+  <groupId>org.apache.shardingsphere.example</groupId>
+  <artifactId>sharding-spring-namespace-mybatis-mysql-example</artifactId>
+
+  <name>AcceptanceTest::sharding::mysql::spring-namespace-mybatis</name>
+  <!-- FIXME change it to the project's website -->
+  <url>http://www.example.com</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.11</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>config-utility</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>example-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>example-spring-mybatis</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.shardingsphere</groupId>
+      <artifactId>sharding-jdbc-spring-namespace</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context</artifactId>
+      <version>4.3.25.RELEASE</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+      <plugins>
+        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+        <plugin>
+          <artifactId>maven-clean-plugin</artifactId>
+          <version>3.1.0</version>
+        </plugin>
+        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+        <plugin>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.8.0</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.22.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-install-plugin</artifactId>
+          <version>2.5.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <version>2.8.2</version>
+        </plugin>
+        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+        <plugin>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.7.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-project-info-reports-plugin</artifactId>
+          <version>3.0.0</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
new file mode 100644
index 0000000..d1e6ed5
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-encrypt.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
new file mode 100644
index 0000000..e2961eb
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceMasterSlaveTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-master-slave.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
new file mode 100644
index 0000000..b270dc3
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingEncryptTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-sharding-encrypt.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..2ecf1a4
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave-encrypt.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
new file mode 100644
index 0000000..35d5cdf
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
new file mode 100644
index 0000000..2a97bf0
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-sharding-databases-tables.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingDatabaseAndTableResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-encrypt.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-encrypt.xml
new file mode 100644
index 0000000..076c957
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-encrypt.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/util
+                        http://www.springframework.org/schema/util/spring-util.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+
+    <bean:properties id="props">
+        <prop key="aes.key.value">123456</prop>
+    </bean:properties>
+
+    <encrypt:data-source id="encryptDataSource" data-source-name="demo_ds" >
+        <encrypt:encrypt-rule>
+            <encrypt:tables>
+                <encrypt:table name="t_user">
+                    <encrypt:column logic-column="user_name" plain-column="user_name" cipher-column="user_name_cipher" encryptor-ref="encryptor_md5" />
+                    <encrypt:column logic-column="pwd" plain-column="pwd_plain" cipher-column="pwd_cipher" encryptor-ref="encryptor_md5"/>
+                </encrypt:table>
+            </encrypt:tables>
+            <encrypt:encryptors>
+                <encrypt:encryptor id="encryptor_aes" type="AES" props-ref="props"/>
+                <encrypt:encryptor id="encryptor_md5" type="MD5" />
+            </encrypt:encryptors>
+        </encrypt:encrypt-rule>
+        <encrypt:props>
+            <prop key="sql.show">false</prop>
+        </encrypt:props>
+    </encrypt:data-source>
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="encryptDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-master-slave.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-master-slave.xml
new file mode 100644
index 0000000..c420e78
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-master-slave.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans 
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_master" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_slave_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_slave_1?useSSL=false"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" />
+    <master-slave:data-source id="masterSlaveDataSource" master-data-source-name="demo_ds_master" slave-data-source-names="demo_ds_slave_0, demo_ds_slave_1" strategy-ref="randomStrategy" />
+    
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="masterSlaveDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="masterSlaveDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
new file mode 100644
index 0000000..8db9e00
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_${user_id % 2}" />
+    <sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order_${order_id % 2}" />
+    <sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_id" algorithm-expression="t_order_item_${order_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+    
+    <sharding:key-generator id="orderKeyGenerator" type="SNOWFLAKE" column="order_id" props-ref="properties" />
+    <sharding:key-generator id="itemKeyGenerator" type="SNOWFLAKE" column="order_item_id" props-ref="properties" />
+    
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_0, demo_ds_1">
+            <sharding:table-rules>
+                <sharding:table-rule logic-table="t_order" actual-data-nodes="demo_ds_${0..1}.t_order_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderTableStrategy" key-generator-ref="orderKeyGenerator" />
+                <sharding:table-rule logic-table="t_order_item" actual-data-nodes="demo_ds_${0..1}.t_order_item_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderItemTableStrategy" key-generator-ref="itemKeyGenerator" />
+            </sharding:table-rules>
+            <sharding:binding-table-rules>
+                <sharding:binding-table-rule logic-tables="t_order,t_order_item"/>
+            </sharding:binding-table-rules>
+            <sharding:broadcast-table-rules>
+                <sharding:broadcast-table-rule table="t_address"/>
+            </sharding:broadcast-table-rules>
+        </sharding:sharding-rule>
+        <sharding:props>
+            <prop key="sql.show">false</prop>
+        </sharding:props>
+    </sharding:data-source>
+    
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-encrypt.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
new file mode 100644
index 0000000..cfa6f45
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                        http://www.springframework.org/schema/util
+                        http://www.springframework.org/schema/util/spring-util.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_${user_id % 2}" />
+    <sharding:inline-strategy id="tableStrategy" sharding-column="user_id" algorithm-expression="t_user_${user_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_0, demo_ds_1">
+            <sharding:encrypt-rule>
+                <encrypt:tables>
+                    <encrypt:table name="t_user">
+                        <encrypt:column logic-column="user_name" plain-column="user_name" cipher-column="user_name_cipher"  encryptor-ref="encryptor_aes" />
+                        <encrypt:column logic-column="pwd" plain-column="pwd_plain" cipher-column="pwd_cipher" encryptor-ref="encryptor_md5"/>
+                    </encrypt:table>
+                </encrypt:tables>
+                <encrypt:encryptors>
+                    <encrypt:encryptor id="encryptor_aes" type="AES"  props-ref="props"/>
+                    <encrypt:encryptor id="encryptor_md5" type="MD5" />
+                </encrypt:encryptors>
+            </sharding:encrypt-rule>
+            <sharding:table-rules>
+                <sharding:table-rule
+                        logic-table="t_user"
+                        actual-data-nodes="demo_ds_${0..1}.t_user_${0..1}"
+                        database-strategy-ref="databaseStrategy"
+                        table-strategy-ref="tableStrategy"
+                />
+            </sharding:table-rules>
+        </sharding:sharding-rule>
+
+        <sharding:props>
+            <prop key="sql.show">true</prop>
+        </sharding:props>
+    </sharding:data-source>
+
+    <bean:properties id="props">
+        <prop key="aes.key.value">123456</prop>
+    </bean:properties>
+
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
new file mode 100644
index 0000000..a964562
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd http://shardingsphere.apache.org/schema/shardingsphere/encrypt http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_master_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_ms_${user_id % 2}" />
+    <sharding:inline-strategy id="tableStrategy" sharding-column="user_id" algorithm-expression="t_user_${user_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+    
+    <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" />
+
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_master_0,demo_ds_master_0_slave_0,demo_ds_master_0_slave_1,demo_ds_master_1,demo_ds_master_1_slave_0,demo_ds_master_1_slave_1">
+            <sharding:encrypt-rule>
+                <encrypt:tables>
+                    <encrypt:table name="t_user">
+                        <encrypt:column logic-column="user_name" plain-column="user_name" cipher-column="user_name_cipher"  encryptor-ref="encryptor_aes" />
+                        <encrypt:column logic-column="pwd" plain-column="pwd_plain" cipher-column="pwd_cipher" encryptor-ref="encryptor_md5"/>
+                    </encrypt:table>
+                </encrypt:tables>
+                <encrypt:encryptors>
+                    <encrypt:encryptor id="encryptor_aes" type="AES"  props-ref="props"/>
+                    <encrypt:encryptor id="encryptor_md5" type="MD5" />
+                </encrypt:encryptors>
+            </sharding:encrypt-rule>
+            <sharding:master-slave-rules>
+                <sharding:master-slave-rule id="demo_ds_ms_0" master-data-source-name="demo_ds_master_0" slave-data-source-names="demo_ds_master_0_slave_0, demo_ds_master_0_slave_1" strategy-ref="randomStrategy" />
+                <sharding:master-slave-rule id="demo_ds_ms_1" master-data-source-name="demo_ds_master_1" slave-data-source-names="demo_ds_master_1_slave_0, demo_ds_master_1_slave_1" strategy-ref="randomStrategy" />
+            </sharding:master-slave-rules>
+            <sharding:table-rules>
+                <sharding:table-rule
+                        logic-table="t_user"
+                        actual-data-nodes="demo_ds_ms_${0..1}.t_user_${0..1}"
+                        database-strategy-ref="databaseStrategy"
+                        table-strategy-ref="tableStrategy" />
+            </sharding:table-rules>
+        </sharding:sharding-rule>
+        <sharding:props>
+            <prop key="sql.show">false</prop>
+        </sharding:props>
+    </sharding:data-source>
+
+    <bean:properties id="props">
+        <prop key="aes.key.value">123456</prop>
+    </bean:properties>
+
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
new file mode 100644
index 0000000..528d150
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_master_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_ms_${user_id % 2}" />
+    <sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order_${order_id % 2}" />
+    <sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_item_id" algorithm-expression="t_order_item_${order_item_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+
+    <sharding:key-generator id="orderKeyGenerator" type="SNOWFLAKE" column="order_id" props-ref="properties" />
+    <sharding:key-generator id="itemKeyGenerator" type="SNOWFLAKE" column="order_item_id" props-ref="properties" />
+    
+    <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" />
+
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_master_0,demo_ds_master_0_slave_0,demo_ds_master_0_slave_1,demo_ds_master_1,demo_ds_master_1_slave_0,demo_ds_master_1_slave_1">
+            <sharding:master-slave-rules>
+                <sharding:master-slave-rule id="demo_ds_ms_0" master-data-source-name="demo_ds_master_0" slave-data-source-names="demo_ds_master_0_slave_0, demo_ds_master_0_slave_1" strategy-ref="randomStrategy" />
+                <sharding:master-slave-rule id="demo_ds_ms_1" master-data-source-name="demo_ds_master_1" slave-data-source-names="demo_ds_master_1_slave_0, demo_ds_master_1_slave_1" strategy-ref="randomStrategy" />
+            </sharding:master-slave-rules>
+            <sharding:table-rules>
+                <sharding:table-rule logic-table="t_order" actual-data-nodes="demo_ds_ms_${0..1}.t_order_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderTableStrategy" key-generator-ref="orderKeyGenerator"/>
+                <sharding:table-rule logic-table="t_order_item" actual-data-nodes="demo_ds_ms_${0..1}.t_order_item_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderItemTableStrategy" key-generator-ref="itemKeyGenerator"/>
+            </sharding:table-rules>
+            <sharding:binding-table-rules>
+                <sharding:binding-table-rule logic-tables="t_order,t_order_item"/>
+            </sharding:binding-table-rules>
+            <sharding:broadcast-table-rules>
+                <sharding:broadcast-table-rule table="t_address"/>
+            </sharding:broadcast-table-rules>
+        </sharding:sharding-rule>
+        <sharding:props>
+            <prop key="sql.show">false</prop>
+        </sharding:props>
+    </sharding:data-source>
+    
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/logback.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/logback.xml
new file mode 100644
index 0000000..9cb2593
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-mysql-example/src/test/resources/logback.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <property name="log.context.name" value="sharding-jdbc-spring-namespace-mybatis-quickstart" />
+    <property name="log.charset" value="UTF-8" />
+    <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n" />
+    <contextName>${log.context.name}</contextName>
+    
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder charset="${log.charset}">
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+    <root>
+        <level value="INFO" />
+        <appender-ref ref="STDOUT" />
+    </root>
+</configuration>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/pom.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/pom.xml
new file mode 100644
index 0000000..f1d9f4c
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/pom.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-example</artifactId>
+    <version>4.0.0-RC4-SNAPSHOT</version>
+  </parent>
+  <groupId>org.apache.shardingsphere.example</groupId>
+  <artifactId>sharding-spring-namespace-mybatis-postgresql-example</artifactId>
+
+  <name>AcceptanceTest::sharding::postgresql::spring-namespace-mybatis</name>
+  <!-- FIXME change it to the project's website -->
+  <url>http://www.example.com</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.11</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>config-utility</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>example-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shardingsphere.example</groupId>
+      <artifactId>example-spring-mybatis</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.shardingsphere</groupId>
+      <artifactId>sharding-jdbc-spring-namespace</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context</artifactId>
+      <version>4.3.25.RELEASE</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+      <plugins>
+        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+        <plugin>
+          <artifactId>maven-clean-plugin</artifactId>
+          <version>3.1.0</version>
+        </plugin>
+        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+        <plugin>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.8.0</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.22.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-install-plugin</artifactId>
+          <version>2.5.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <version>2.8.2</version>
+        </plugin>
+        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+        <plugin>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.7.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-project-info-reports-plugin</artifactId>
+          <version>3.0.0</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
new file mode 100644
index 0000000..d1e6ed5
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-encrypt.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
new file mode 100644
index 0000000..e2961eb
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceMasterSlaveTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-master-slave.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
new file mode 100644
index 0000000..b270dc3
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingEncryptTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-sharding-encrypt.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..2ecf1a4
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave-encrypt.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
new file mode 100644
index 0000000..35d5cdf
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
new file mode 100644
index 0000000..2a97bf0
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingTest {
+
+    private static final String CONFIG_FILE = "META-INF/application-sharding-databases-tables.xml";
+
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingDatabaseAndTableResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-encrypt.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-encrypt.xml
new file mode 100644
index 0000000..d5aac5a
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-encrypt.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/util
+                        http://www.springframework.org/schema/util/spring-util.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+
+    <bean:properties id="props">
+        <prop key="aes.key.value">123456</prop>
+    </bean:properties>
+
+    <encrypt:data-source id="encryptDataSource" data-source-name="demo_ds" >
+        <encrypt:encrypt-rule>
+            <encrypt:tables>
+                <encrypt:table name="t_user">
+                    <encrypt:column logic-column="user_name" plain-column="user_name" cipher-column="user_name_cipher" encryptor-ref="encryptor_md5" />
+                    <encrypt:column logic-column="pwd" plain-column="pwd_plain" cipher-column="pwd_cipher" encryptor-ref="encryptor_md5"/>
+                </encrypt:table>
+            </encrypt:tables>
+            <encrypt:encryptors>
+                <encrypt:encryptor id="encryptor_aes" type="AES" props-ref="props"/>
+                <encrypt:encryptor id="encryptor_md5" type="MD5" />
+            </encrypt:encryptors>
+        </encrypt:encrypt-rule>
+        <encrypt:props>
+            <prop key="sql.show">false</prop>
+        </encrypt:props>
+    </encrypt:data-source>
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="encryptDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-master-slave.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-master-slave.xml
new file mode 100644
index 0000000..f4c1c60
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-master-slave.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans 
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_master" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_slave_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_slave_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" />
+    <master-slave:data-source id="masterSlaveDataSource" master-data-source-name="demo_ds_master" slave-data-source-names="demo_ds_slave_0, demo_ds_slave_1" strategy-ref="randomStrategy" />
+    
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="masterSlaveDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="masterSlaveDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
new file mode 100644
index 0000000..a9f92a2
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_${user_id % 2}" />
+    <sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order_${order_id % 2}" />
+    <sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_id" algorithm-expression="t_order_item_${order_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+    
+    <sharding:key-generator id="orderKeyGenerator" type="SNOWFLAKE" column="order_id" props-ref="properties" />
+    <sharding:key-generator id="itemKeyGenerator" type="SNOWFLAKE" column="order_item_id" props-ref="properties" />
+    
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_0, demo_ds_1">
+            <sharding:table-rules>
+                <sharding:table-rule logic-table="t_order" actual-data-nodes="demo_ds_${0..1}.t_order_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderTableStrategy" key-generator-ref="orderKeyGenerator" />
+                <sharding:table-rule logic-table="t_order_item" actual-data-nodes="demo_ds_${0..1}.t_order_item_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderItemTableStrategy" key-generator-ref="itemKeyGenerator" />
+            </sharding:table-rules>
+            <sharding:binding-table-rules>
+                <sharding:binding-table-rule logic-tables="t_order,t_order_item"/>
+            </sharding:binding-table-rules>
+            <sharding:broadcast-table-rules>
+                <sharding:broadcast-table-rule table="t_address"/>
+            </sharding:broadcast-table-rules>
+        </sharding:sharding-rule>
+        <sharding:props>
+            <prop key="sql.show">false</prop>
+        </sharding:props>
+    </sharding:data-source>
+    
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-encrypt.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
new file mode 100644
index 0000000..4595d9a
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                        http://www.springframework.org/schema/util
+                        http://www.springframework.org/schema/util/spring-util.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt
+                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_${user_id % 2}" />
+    <sharding:inline-strategy id="tableStrategy" sharding-column="user_id" algorithm-expression="t_user_${user_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_0, demo_ds_1">
+            <sharding:encrypt-rule>
+                <encrypt:tables>
+                    <encrypt:table name="t_user">
+                        <encrypt:column logic-column="user_name" plain-column="user_name" cipher-column="user_name_cipher"  encryptor-ref="encryptor_aes" />
+                        <encrypt:column logic-column="pwd" plain-column="pwd_plain" cipher-column="pwd_cipher" encryptor-ref="encryptor_md5"/>
+                    </encrypt:table>
+                </encrypt:tables>
+                <encrypt:encryptors>
+                    <encrypt:encryptor id="encryptor_aes" type="AES"  props-ref="props"/>
+                    <encrypt:encryptor id="encryptor_md5" type="MD5" />
+                </encrypt:encryptors>
+            </sharding:encrypt-rule>
+            <sharding:table-rules>
+                <sharding:table-rule
+                        logic-table="t_user"
+                        actual-data-nodes="demo_ds_${0..1}.t_user_${0..1}"
+                        database-strategy-ref="databaseStrategy"
+                        table-strategy-ref="tableStrategy"
+                />
+            </sharding:table-rules>
+        </sharding:sharding-rule>
+
+        <sharding:props>
+            <prop key="sql.show">true</prop>
+        </sharding:props>
+    </sharding:data-source>
+
+    <bean:properties id="props">
+        <prop key="aes.key.value">123456</prop>
+    </bean:properties>
+
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
new file mode 100644
index 0000000..ea5bb90
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd http://shardingsphere.apache.org/schema/shardingsphere/encrypt http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_master_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_ms_${user_id % 2}" />
+    <sharding:inline-strategy id="tableStrategy" sharding-column="user_id" algorithm-expression="t_user_${user_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+    
+    <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" />
+
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_master_0,demo_ds_master_0_slave_0,demo_ds_master_0_slave_1,demo_ds_master_1,demo_ds_master_1_slave_0,demo_ds_master_1_slave_1">
+            <sharding:encrypt-rule>
+                <encrypt:tables>
+                    <encrypt:table name="t_user">
+                        <encrypt:column logic-column="user_name" plain-column="user_name" cipher-column="user_name_cipher"  encryptor-ref="encryptor_aes" />
+                        <encrypt:column logic-column="pwd" plain-column="pwd_plain" cipher-column="pwd_cipher" encryptor-ref="encryptor_md5"/>
+                    </encrypt:table>
+                </encrypt:tables>
+                <encrypt:encryptors>
+                    <encrypt:encryptor id="encryptor_aes" type="AES"  props-ref="props"/>
+                    <encrypt:encryptor id="encryptor_md5" type="MD5" />
+                </encrypt:encryptors>
+            </sharding:encrypt-rule>
+            <sharding:master-slave-rules>
+                <sharding:master-slave-rule id="demo_ds_ms_0" master-data-source-name="demo_ds_master_0" slave-data-source-names="demo_ds_master_0_slave_0, demo_ds_master_0_slave_1" strategy-ref="randomStrategy" />
+                <sharding:master-slave-rule id="demo_ds_ms_1" master-data-source-name="demo_ds_master_1" slave-data-source-names="demo_ds_master_1_slave_0, demo_ds_master_1_slave_1" strategy-ref="randomStrategy" />
+            </sharding:master-slave-rules>
+            <sharding:table-rules>
+                <sharding:table-rule
+                        logic-table="t_user"
+                        actual-data-nodes="demo_ds_ms_${0..1}.t_user_${0..1}"
+                        database-strategy-ref="databaseStrategy"
+                        table-strategy-ref="tableStrategy" />
+            </sharding:table-rules>
+        </sharding:sharding-rule>
+        <sharding:props>
+            <prop key="sql.show">false</prop>
+        </sharding:props>
+    </sharding:data-source>
+
+    <bean:properties id="props">
+        <prop key="aes.key.value">123456</prop>
+    </bean:properties>
+
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
new file mode 100644
index 0000000..847e8d0
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+       xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave"
+       xmlns:bean="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd
+                        http://www.springframework.org/schema/tx 
+                        http://www.springframework.org/schema/tx/spring-tx.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
+                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave
+                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis" />
+    
+    <bean id="demo_ds_master_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+    
+    <bean id="demo_ds_master_0_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_0_slave_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_0" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_0"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="demo_ds_master_1_slave_1" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_master_1_slave_1"/>
+        <property name="username" value="postgres"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_ms_${user_id % 2}" />
+    <sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order_${order_id % 2}" />
+    <sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_item_id" algorithm-expression="t_order_item_${order_item_id % 2}" />
+    
+    <bean:properties id="properties">
+        <prop key="worker.id">123</prop>
+    </bean:properties>
+
+    <sharding:key-generator id="orderKeyGenerator" type="SNOWFLAKE" column="order_id" props-ref="properties" />
+    <sharding:key-generator id="itemKeyGenerator" type="SNOWFLAKE" column="order_item_id" props-ref="properties" />
+    
+    <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" />
+
+    <sharding:data-source id="shardingDataSource">
+        <sharding:sharding-rule data-source-names="demo_ds_master_0,demo_ds_master_0_slave_0,demo_ds_master_0_slave_1,demo_ds_master_1,demo_ds_master_1_slave_0,demo_ds_master_1_slave_1">
+            <sharding:master-slave-rules>
+                <sharding:master-slave-rule id="demo_ds_ms_0" master-data-source-name="demo_ds_master_0" slave-data-source-names="demo_ds_master_0_slave_0, demo_ds_master_0_slave_1" strategy-ref="randomStrategy" />
+                <sharding:master-slave-rule id="demo_ds_ms_1" master-data-source-name="demo_ds_master_1" slave-data-source-names="demo_ds_master_1_slave_0, demo_ds_master_1_slave_1" strategy-ref="randomStrategy" />
+            </sharding:master-slave-rules>
+            <sharding:table-rules>
+                <sharding:table-rule logic-table="t_order" actual-data-nodes="demo_ds_ms_${0..1}.t_order_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderTableStrategy" key-generator-ref="orderKeyGenerator"/>
+                <sharding:table-rule logic-table="t_order_item" actual-data-nodes="demo_ds_ms_${0..1}.t_order_item_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderItemTableStrategy" key-generator-ref="itemKeyGenerator"/>
+            </sharding:table-rules>
+            <sharding:binding-table-rules>
+                <sharding:binding-table-rule logic-tables="t_order,t_order_item"/>
+            </sharding:binding-table-rules>
+            <sharding:broadcast-table-rules>
+                <sharding:broadcast-table-rule table="t_address"/>
+            </sharding:broadcast-table-rules>
+        </sharding:sharding-rule>
+        <sharding:props>
+            <prop key="sql.show">false</prop>
+        </sharding:props>
+    </sharding:data-source>
+    
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="shardingDataSource" />
+    </bean>
+    <tx:annotation-driven />
+    
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="shardingDataSource"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+    
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/logback.xml b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/logback.xml
new file mode 100644
index 0000000..9cb2593
--- /dev/null
+++ b/sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-postgresql-example/src/test/resources/logback.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <property name="log.context.name" value="sharding-jdbc-spring-namespace-mybatis-quickstart" />
+    <property name="log.charset" value="UTF-8" />
+    <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n" />
+    <contextName>${log.context.name}</contextName>
+    
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder charset="${log.charset}">
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+    <root>
+        <level value="INFO" />
+        <appender-ref ref="STDOUT" />
+    </root>
+</configuration>
diff --git a/sharding-proxy-example/pom.xml b/sharding-proxy-example/pom.xml
new file mode 100644
index 0000000..64665cb
--- /dev/null
+++ b/sharding-proxy-example/pom.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <artifactId>shardingsphere-example</artifactId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <artifactId>sharding-proxy-example</artifactId>
+    <name>AcceptanceTest::proxy::root</name>
+
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>proxy-orchestration-example</module>
+        <module>proxy-sharding-example</module>
+    </modules>
+</project>
diff --git a/sharding-proxy-example/proxy-orchestration-example/pom.xml b/sharding-proxy-example/proxy-orchestration-example/pom.xml
new file mode 100644
index 0000000..3c5d193
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/pom.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>sharding-proxy-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>proxy-orchestration-example</artifactId>
+    <name>AcceptanceTest::proxy::orchestration::root</name>
+
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>sharding-proxy-orchestration-raw-jdbc-mysql-example</module>
+        <module>sharding-proxy-orchestration-raw-jdbc-postgresql-example</module>
+        <module>sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example</module>
+        <module>sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example</module>
+        <module>sharding-proxy-orchestration-spring-boot-mybatis-mysql-example</module>
+        <module>sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example</module>
+    </modules>
+</project>
\ No newline at end of file
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/pom.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/pom.xml
new file mode 100644
index 0000000..80040c6
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/pom.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>proxy-orchestration-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-proxy-orchestration-raw-jdbc-mysql-example</artifactId>
+
+    <name>AcceptanceTest::proxy::orchestration::mysql::sharding::raw-jdbc</name>
+    <!-- FIXME change it to the project's website -->
+    <url>http://www.example.com</url>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.7</maven.compiler.source>
+        <maven.compiler.target>1.7</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.11</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>config-utility</artifactId>
+            <version>${project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-api</artifactId>
+            <version>${project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-raw-jdbc</artifactId>
+            <version>${project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+            <plugins>
+                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+                <plugin>
+                    <artifactId>maven-clean-plugin</artifactId>
+                    <version>3.1.0</version>
+                </plugin>
+                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+                <plugin>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.8.0</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.22.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-install-plugin</artifactId>
+                    <version>2.5.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <version>2.8.2</version>
+                </plugin>
+                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+                <plugin>
+                    <artifactId>maven-site-plugin</artifactId>
+                    <version>3.7.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-project-info-reports-plugin</artifactId>
+                    <version>3.0.0</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+</project>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
new file mode 100644
index 0000000..3b39ab5
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaEncryptTest {
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertEncrypt(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
new file mode 100644
index 0000000..fb76397
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaMasterSlaveTest {
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
new file mode 100644
index 0000000..b908fd3
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingEncrypt(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
new file mode 100644
index 0000000..c65cf9c
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlave {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
new file mode 100644
index 0000000..ac644f3
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlaveEncrypt {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaveEncrypt(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
new file mode 100644
index 0000000..0c424cc
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_DATABASES_AND_TABLES);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingTableDatabases(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
new file mode 100644
index 0000000..7bdbc48
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.factory;
+
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.example.type.ShardingType;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class DataSourceFactory {
+    
+    public static DataSource newInstance(final ShardingType shardingType) throws SQLException {
+        switch (shardingType) {
+            case SHARDING_ENCRYPT:
+                return DataSourceUtil.createDataSource("sharding_encrypt", DatabaseType.PROXY_MYSQL);
+            case SHARDING_DATABASES_AND_TABLES:
+                return DataSourceUtil.createDataSource("sharding_db", DatabaseType.PROXY_MYSQL);
+            case MASTER_SLAVE:
+                return DataSourceUtil.createDataSource("master_slave_db", DatabaseType.PROXY_MYSQL);
+            case SHARDING_MASTER_SLAVE:
+                return DataSourceUtil.createDataSource("sharding_master_slave_db", DatabaseType.PROXY_MYSQL);
+            case SHARDING_MASTER_SLAVE_ENCRYPT:
+                return DataSourceUtil.createDataSource("sharding_master_slave_encrypt_db", DatabaseType.PROXY_MYSQL);
+            case ENCRYPT:
+                return DataSourceUtil.createDataSource("encrypt_db", DatabaseType.PROXY_MYSQL);
+            default:
+                throw new UnsupportedOperationException(shardingType.name());
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/pom.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/pom.xml
new file mode 100644
index 0000000..ff48713
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/pom.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>proxy-orchestration-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-proxy-orchestration-raw-jdbc-postgresql-example</artifactId>
+
+    <name>AcceptanceTest::proxy::orchestration::postgresql::sharding::raw-jdbc</name>
+    <!-- FIXME change it to the project's website -->
+    <url>http://www.example.com</url>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.7</maven.compiler.source>
+        <maven.compiler.target>1.7</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.11</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>config-utility</artifactId>
+            <version>${project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-api</artifactId>
+            <version>${project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-raw-jdbc</artifactId>
+            <version>${project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+            <plugins>
+                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+                <plugin>
+                    <artifactId>maven-clean-plugin</artifactId>
+                    <version>3.1.0</version>
+                </plugin>
+                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+                <plugin>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.8.0</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.22.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-install-plugin</artifactId>
+                    <version>2.5.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <version>2.8.2</version>
+                </plugin>
+                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+                <plugin>
+                    <artifactId>maven-site-plugin</artifactId>
+                    <version>3.7.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-project-info-reports-plugin</artifactId>
+                    <version>3.0.0</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+</project>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
new file mode 100644
index 0000000..3f309cf
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaEncryptTest {
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertEncrypt(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
new file mode 100644
index 0000000..2292636
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaMasterSlaveTest {
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
new file mode 100644
index 0000000..83ffa23
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingEncrypt(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
new file mode 100644
index 0000000..1fab281
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlave {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
new file mode 100644
index 0000000..9330b8f
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlaveEncrypt {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaveEncrypt(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
new file mode 100644
index 0000000..43d9dfe
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_DATABASES_AND_TABLES);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertPgTempShardingTableDatabases(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
new file mode 100644
index 0000000..12cbf4c
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.factory;
+
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.example.type.ShardingType;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class DataSourceFactory {
+    
+    public static DataSource newInstance(final ShardingType shardingType) throws SQLException {
+        switch (shardingType) {
+            case SHARDING_ENCRYPT:
+                return DataSourceUtil.createDataSource("sharding_encrypt", DatabaseType.PROXY_POSTGRESQL);
+            case SHARDING_DATABASES_AND_TABLES:
+                return DataSourceUtil.createDataSource("sharding_db", DatabaseType.PROXY_POSTGRESQL);
+            case MASTER_SLAVE:
+                return DataSourceUtil.createDataSource("master_slave_db", DatabaseType.PROXY_POSTGRESQL);
+            case SHARDING_MASTER_SLAVE:
+                return DataSourceUtil.createDataSource("sharding_master_slave_db", DatabaseType.PROXY_POSTGRESQL);
+            case SHARDING_MASTER_SLAVE_ENCRYPT:
+                return DataSourceUtil.createDataSource("sharding_master_slave_encrypt_db", DatabaseType.PROXY_POSTGRESQL);
+            case ENCRYPT:
+                return DataSourceUtil.createDataSource("encrypt_db", DatabaseType.PROXY_POSTGRESQL);
+            default:
+                throw new UnsupportedOperationException(shardingType.name());
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/pom.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/pom.xml
new file mode 100644
index 0000000..3855cac
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>proxy-orchestration-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-proxy-orchestration-spring-boot-mybatis-mysql-example</artifactId>
+
+
+    <name>AcceptanceTest::proxy::orchestration::mysql::spring-boot-mybatis</name>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.7</maven.compiler.source>
+        <maven.compiler.target>1.7</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-spring-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootEOrchestrationEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootEOrchestrationEncryptTest.java
new file mode 100644
index 0000000..474a58f
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootEOrchestrationEncryptTest.java
@@ -0,0 +1,31 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("encrypt")
+public class SpringBootEOrchestrationEncryptTest {
+    
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+    
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootOrchestrationMasterSlaveTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootOrchestrationMasterSlaveTest.java
new file mode 100644
index 0000000..4874f85
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootOrchestrationMasterSlaveTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("master-slave")
+public class SpringBootOrchestrationMasterSlaveTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario.process1(commonService);
+        SpringResultAssertUtils.assertMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootOrchestrationShardingDatabasesTablesTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootOrchestrationShardingDatabasesTablesTest.java
new file mode 100644
index 0000000..ec50bea
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootOrchestrationShardingDatabasesTablesTest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-databases-tables")
+public class SpringBootOrchestrationShardingDatabasesTablesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario.process1(commonService);
+        SpringResultAssertUtils.assertShardingDatabaseAndTableResult(commonService);
+    }
+    
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootOrchestrationShardingEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootOrchestrationShardingEncryptTest.java
new file mode 100644
index 0000000..c1e66d0
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootOrchestrationShardingEncryptTest.java
@@ -0,0 +1,31 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-encrypt")
+public class SpringBootOrchestrationShardingEncryptTest {
+    
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+    
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootOrchestrationShardingMasterSlaveEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootOrchestrationShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..1dc93ef
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootOrchestrationShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,31 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-master-slave-encrypt")
+public class SpringBootOrchestrationShardingMasterSlaveEncryptTest {
+    
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+    
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootTestMain.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootTestMain.java
new file mode 100644
index 0000000..036b725
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootTestMain.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
+import org.springframework.context.annotation.ComponentScan;
+
+@ComponentScan("org.apache.shardingsphere.example")
+@MapperScan(basePackages = "org.apache.shardingsphere.example.core.mybatis.repository")
+@SpringBootApplication(exclude = JtaAutoConfiguration.class)
+public class SpringBootTestMain {
+    
+    public static void main(final String[] args) {
+        SpringApplication.run(SpringBootTestMain.class, args);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootsOrchestrationShardingMasterSlaveTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootsOrchestrationShardingMasterSlaveTest.java
new file mode 100644
index 0000000..c37e6e3
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootsOrchestrationShardingMasterSlaveTest.java
@@ -0,0 +1,28 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-master-slave")
+public class SpringBootsOrchestrationShardingMasterSlaveTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario.process1(commonService);
+        SpringResultAssertUtils.assertShardingMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/META-INF/mybatis-config.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/META-INF/mybatis-config.xml
new file mode 100644
index 0000000..e450f2f
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/META-INF/mybatis-config.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <mappers>
+        <mapper resource="META-INF/mappers/mysql/AddressMapper.xml"/>
+        <mapper resource="META-INF/mappers/mysql/OrderMapper.xml"/>
+        <mapper resource="META-INF/mappers/mysql/OrderItemMapper.xml"/>
+        <mapper resource="META-INF/mappers/mysql/UserMapper.xml"/>
+    </mappers>
+</configuration>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-encrypt.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-encrypt.properties
new file mode 100644
index 0000000..920e94f
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-encrypt.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://localhost:3307/encrypt_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-master-slave.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-master-slave.properties
new file mode 100644
index 0000000..e90ef75
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-master-slave.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://localhost:3307/master_slave_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-databases-tables.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-databases-tables.properties
new file mode 100644
index 0000000..c6b463b
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-databases-tables.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://localhost:3307/sharding_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-encrypt.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-encrypt.properties
new file mode 100644
index 0000000..c6f20b4
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-encrypt.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://localhost:3307/sharding_encrypt?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave-encrypt.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave-encrypt.properties
new file mode 100644
index 0000000..444c3da
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave-encrypt.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://localhost:3307/sharding_master_slave_encrypt_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave.properties
new file mode 100644
index 0000000..08a84af
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://localhost:3307/sharding_master_slave_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application.properties
new file mode 100644
index 0000000..5854387
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/application.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+#spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+#spring.datasource.url=jdbc:mysql://localhost:3307/encrypt_db?useServerPrepStmts=true&cachePrepStmts=true
+#spring.datasource.username=root
+#spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-encrypt.yaml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-encrypt.yaml
new file mode 100644
index 0000000..d34ae0b
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-encrypt.yaml
@@ -0,0 +1,93 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master_slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: encrypt_db
+#
+#dataSource:
+#  url: jdbc:postgresql://localhost:5432/demo_ds?serverTimezone=UTC&useSSL=false
+#  username: postgres
+#  password: postgres
+#  connectionTimeoutMilliseconds: 30000
+#  idleTimeoutMilliseconds: 60000
+#  maxLifetimeMilliseconds: 1800000
+#  maxPoolSize: 50
+#
+#encryptRule:
+#  encryptors:
+#    encryptor_aes:
+#      type: aes
+#      props:
+#        aes.key.value: 123456abc
+#    encryptor_md5:
+#      type: md5
+#  tables:
+#    t_encrypt:
+#      columns:
+#        user_id:
+#          plainColumn: user_plain
+#          cipherColumn: user_cipher
+#          encryptor: encryptor_aes
+#        order_id:
+#          cipherColumn: order_encrypt
+#          encryptor: encryptor_md5
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: encrypt_db
+
+dataSource:
+  url: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 50
+
+encryptRule:
+  encryptors:
+    encryptor_aes:
+      type: aes
+      props:
+        aes.key.value: 123456abc
+    encryptor_md5:
+      type: md5
+  tables:
+    t_encrypt:
+      columns:
+        user_id:
+          plainColumn: user_plain
+          cipherColumn: user_cipher
+          encryptor: encryptor_aes
+        order_id:
+          cipherColumn: order_cipher
+          encryptor: encryptor_md5
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-master-slave.yaml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-master-slave.yaml
new file mode 100644
index 0000000..7efd33b
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-master-slave.yaml
@@ -0,0 +1,102 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+######################################################################################################
+#
+#schemaName: master_slave_db
+#
+#dataSources:
+#  master_ds:
+#    url: jdbc:postgresql://127.0.0.1:5432/demo_ds_master?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_0:
+#    url: jdbc:postgresql://127.0.0.1:5432/demo_ds_slave_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_1:
+#    url: jdbc:postgresql://127.0.0.1:5432/demo_ds_slave_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#masterSlaveRule:
+#  name: ms_ds
+#  masterDataSourceName: master_ds
+#  slaveDataSourceNames:
+#    - slave_ds_0
+#    - slave_ds_1
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+
+schemaName: master_slave_db
+
+dataSources:
+  master_ds:
+    url: jdbc:mysql://127.0.0.1:3306/demo_ds_master?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  slave_ds_0:
+    url: jdbc:mysql://127.0.0.1:3306/demo_ds_slave_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  slave_ds_1:
+    url: jdbc:mysql://127.0.0.1:3306/demo_ds_slave_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+masterSlaveRule:
+  name: ms_ds
+  masterDataSourceName: master_ds
+  slaveDataSourceNames:
+    - slave_ds_0
+    - slave_ds_1
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-encrypt.yaml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-encrypt.yaml
new file mode 100644
index 0000000..1313e40
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-encrypt.yaml
@@ -0,0 +1,52 @@
+schemaName: sharding_encrypt
+
+dataSources:
+  ds_0:
+    url: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name_plain
+            cipherColumn: assisted_query_pwd
+            encryptor: encryptor_aes
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-master-slave-encrypt.yaml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-master-slave-encrypt.yaml
new file mode 100644
index 0000000..fe9d861
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-master-slave-encrypt.yaml
@@ -0,0 +1,151 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master_slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_encrypt_db
+
+dataSources:
+  ds0:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave0:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave1:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave0:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave1:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+
+shardingRule:
+  tables:
+    t_order:
+      actualDataNodes: ms_ds${0..1}.t_order_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+    t_order_item:
+      actualDataNodes: ms_ds${0..1}.t_order_item_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+  bindingTables:
+    - t_order,t_order_item
+
+  defaultDataSourceName: ds0
+  defaultTableStrategy:
+    none:
+
+  masterSlaveRules:
+    ms_ds0:
+      masterDataSourceName: ds0
+      slaveDataSourceNames:
+        - ds0_slave0
+        - ds0_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ms_ds1:
+      masterDataSourceName: ds1
+      slaveDataSourceNames:
+        - ds1_slave0
+        - ds1_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
+
+encryptRule:
+  encryptors:
+    encryptor_aes:
+      type: aes
+      props:
+        aes.key.value: 123456abc
+    encryptor_md5:
+      type: md5
+  tables:
+    t_order:
+      columns:
+        user_id:
+          plainColumn: user_plain
+          cipherColumn: user_cipher
+          encryptor: encryptor_aes
+        order_id:
+          cipherColumn: order_cipher
+          encryptor: encryptor_md5
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-master-slave.yaml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-master-slave.yaml
new file mode 100644
index 0000000..517acc2
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-master-slave.yaml
@@ -0,0 +1,132 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master_slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_db
+
+dataSources:
+  ds0:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave0:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave1:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave0:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave1:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+
+shardingRule:
+  tables:
+    t_order:
+      actualDataNodes: ms_ds${0..1}.t_order_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+    t_order_item:
+      actualDataNodes: ms_ds${0..1}.t_order_item_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+  bindingTables:
+    - t_order,t_order_item
+
+  defaultDataSourceName: ds0
+  defaultTableStrategy:
+    none:
+
+  masterSlaveRules:
+    ms_ds0:
+      masterDataSourceName: ds0
+      slaveDataSourceNames:
+        - ds0_slave0
+        - ds0_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ms_ds1:
+      masterDataSourceName: ds1
+      slaveDataSourceNames:
+        - ds1_slave0
+        - ds1_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
\ No newline at end of file
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding.yaml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding.yaml
new file mode 100644
index 0000000..48b940f
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding.yaml
@@ -0,0 +1,140 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of sharding rule.
+#   
+# If you want to use sharding, please refer to this file; 
+# if you want to use master-slave, please refer to the config-master_slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: sharding_db
+#
+#dataSources:
+#  ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#shardingRule:
+#  tables:
+#    t_order:
+#      actualDataNodes: ds_${0..1}.t_order_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_id
+#    t_order_item:
+#      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_item_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_item_id
+#  bindingTables:
+#    - t_order,t_order_item
+#  defaultDatabaseStrategy:
+#    inline:
+#      shardingColumn: user_id
+#      algorithmExpression: ds_${user_id % 2}
+#  defaultTableStrategy:
+#    none:
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSources:
+  ds_0:
+    url: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+  tables:
+    t_address:
+      actualDataNodes: ds_${0..1}.t_address
+    t_order:
+      actualDataNodes: ds_${0..1}.t_order_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+    t_order_item:
+      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+  bindingTables:
+    - t_order,t_order_item
+  broadcastTables:
+    - t_address
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/logback.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/logback.xml
new file mode 100644
index 0000000..923ad64
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/logback.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<configuration>
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <logger name="org.apache.shardingsphere" level="info" additivity="false">
+        <appender-ref ref="console"/>
+    </logger>
+
+    <root>
+        <level value="info"/>
+        <appender-ref ref="console"/>
+    </root>
+</configuration> 
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/server.yaml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/server.yaml
new file mode 100644
index 0000000..6abfffa
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/conf/server.yaml
@@ -0,0 +1,31 @@
+######################################################################################################
+#
+# If you want to configure orchestration, authorization and proxy properties, please refer to this file.
+#
+######################################################################################################
+
+#orchestration:
+#  name: orchestration_ds
+#  overwrite: true
+#  registry:
+#    type: zookeeper
+#    serverLists: localhost:2181
+#    namespace: orchestration
+
+authentication:
+  users:
+    root:
+      password:
+
+props:
+  max.connections.size.per.query: 1
+  acceptor.size: 16  # The default value is available processors count * 2.
+  executor.size: 16  # Infinite by default.
+  proxy.frontend.flush.threshold: 128  # The default value is 128.
+  # LOCAL: Proxy will run with LOCAL transaction.
+  # XA: Proxy will run with XA transaction.
+  # BASE: Proxy will run with B.A.S.E transaction.
+  proxy.transaction.type: LOCAL
+  proxy.opentracing.enabled: false
+  query.with.cipher.column: true
+  sql.show: false
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/logback.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/logback.xml
new file mode 100644
index 0000000..9827392
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-mysql-example/src/test/resources/logback.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <property name="log.context.name" value="sharding-proxy-boot-mybatis-example"/>
+    <property name="log.charset" value="UTF-8"/>
+    <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n"/>
+    <contextName>${log.context.name}</contextName>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder charset="${log.charset}">
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+
+    <root>
+        <level value="info"/>
+        <appender-ref ref="STDOUT"/>
+    </root>
+</configuration>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/pom.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/pom.xml
new file mode 100644
index 0000000..8d7c651
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/pom.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>proxy-orchestration-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example</artifactId>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <name>AcceptanceTest::proxy::orchestration::postgresql::spring-boot-mybatis</name>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.7</maven.compiler.source>
+        <maven.compiler.target>1.7</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-spring-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <version>42.2.5</version>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationEncryptTest.java
new file mode 100644
index 0000000..45b24f7
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationEncryptTest.java
@@ -0,0 +1,31 @@
+package org.apache.shardingsphere.example.proxy.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("encrypt")
+public class SpringBootOrchestrationEncryptTest {
+    
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+    
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationMasterSlaveTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationMasterSlaveTest.java
new file mode 100644
index 0000000..ee0e4c9
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationMasterSlaveTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.proxy.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.TempPgSpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("master-slave")
+public class SpringBootOrchestrationMasterSlaveTest {
+    
+    @Autowired
+    private TempPgSpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario.process1(commonService);
+        SpringResultAssertUtils.assertMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationShardingDatabasesTablesTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationShardingDatabasesTablesTest.java
new file mode 100644
index 0000000..1c0abdd
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationShardingDatabasesTablesTest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.proxy.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.TempPgSpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-databases-tables")
+public class SpringBootOrchestrationShardingDatabasesTablesTest {
+    
+    @Autowired
+    private TempPgSpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario.process1(commonService);
+        SpringResultAssertUtils.assertTempPgShardingDatabaseAndTableResult(commonService);
+    }
+    
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationShardingEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationShardingEncryptTest.java
new file mode 100644
index 0000000..c3991c8
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationShardingEncryptTest.java
@@ -0,0 +1,31 @@
+package org.apache.shardingsphere.example.proxy.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-encrypt")
+public class SpringBootOrchestrationShardingEncryptTest {
+    
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+    
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationShardingMasterSlaveEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..1dd324d
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootOrchestrationShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,31 @@
+package org.apache.shardingsphere.example.proxy.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-ms-encrypt")
+public class SpringBootOrchestrationShardingMasterSlaveEncryptTest {
+    
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+    
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootTestMain.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootTestMain.java
new file mode 100644
index 0000000..ffbd1ae
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootTestMain.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.proxy.spring.boot.mybatis;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
+import org.springframework.context.annotation.ComponentScan;
+
+@ComponentScan("org.apache.shardingsphere.example")
+@MapperScan(basePackages = "org.apache.shardingsphere.example.core.mybatis.repository")
+@SpringBootApplication(exclude = JtaAutoConfiguration.class)
+public class SpringBootTestMain {
+    
+    public static void main(final String[] args) {
+        SpringApplication.run(SpringBootTestMain.class, args);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootsOrchestrationShardingMasterSlaveTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootsOrchestrationShardingMasterSlaveTest.java
new file mode 100644
index 0000000..f995b24
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/proxy/spring/boot/mybatis/SpringBootsOrchestrationShardingMasterSlaveTest.java
@@ -0,0 +1,28 @@
+package org.apache.shardingsphere.example.proxy.spring.boot.mybatis;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.TempPgSpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-master-slave")
+public class SpringBootsOrchestrationShardingMasterSlaveTest {
+    
+    @Autowired
+    private TempPgSpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario.process1(commonService);
+        SpringResultAssertUtils.assertShardingMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/META-INF/mybatis-config.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/META-INF/mybatis-config.xml
new file mode 100644
index 0000000..730d2f1
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/META-INF/mybatis-config.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <mappers>
+        <mapper resource="META-INF/mappers/postgresql/AddressMapper.xml"/>
+        <mapper resource="META-INF/mappers/postgresql/OrderMapper.xml"/>
+        <mapper resource="META-INF/mappers/postgresql/OrderItemMapper.xml"/>
+        <mapper resource="META-INF/mappers/postgresql/UserMapper.xml"/>
+    </mappers>
+</configuration>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-encrypt.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-encrypt.properties
new file mode 100644
index 0000000..a15d239
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-encrypt.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:3307/encrypt_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave-encrypt.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave-encrypt.properties
new file mode 100644
index 0000000..abec744
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave-encrypt.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:3307/master_slave_encrypt?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave.properties
new file mode 100644
index 0000000..35dd26e
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave.properties
@@ -0,0 +1,7 @@
+#logging.level.org.apache.shardingsphere.example.core.mybatis=debug
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:3307/master_slave_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-databases-tables.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-databases-tables.properties
new file mode 100644
index 0000000..0339c4c
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-databases-tables.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:3307/sharding_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-encrypt.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-encrypt.properties
new file mode 100644
index 0000000..4bb05f2
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-encrypt.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:3307/sharding_encrypt?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-master-slave.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-master-slave.properties
new file mode 100644
index 0000000..01f80b2
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-master-slave.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:3307/sharding_master_slave_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-ms-encrypt.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-ms-encrypt.properties
new file mode 100644
index 0000000..5e5e445
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-ms-encrypt.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:3307/sharding_master_slave_encrypt_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application.properties b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application.properties
new file mode 100644
index 0000000..5854387
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/application.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+#spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+#spring.datasource.url=jdbc:mysql://localhost:3307/encrypt_db?useServerPrepStmts=true&cachePrepStmts=true
+#spring.datasource.username=root
+#spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-encrypt.yaml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-encrypt.yaml
new file mode 100644
index 0000000..eb3f436
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-encrypt.yaml
@@ -0,0 +1,95 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: encrypt_db
+#
+#dataSource:
+#  url: jdbc:postgresql://localhost:5432/demo_ds?serverTimezone=UTC&useSSL=false
+#  username: postgres
+#  password: postgres
+#  connectionTimeoutMilliseconds: 30000
+#  idleTimeoutMilliseconds: 60000
+#  maxLifetimeMilliseconds: 1800000
+#  maxPoolSize: 50
+#
+#encryptRule:
+#  encryptors:
+#    encryptor_aes:
+#      type: aes
+#      props:
+#        aes.key.value: 123456abc
+#    encryptor_md5:
+#      type: md5
+#  tables:
+#    t_encrypt:
+#      columns:
+#        user_id:
+#          plainColumn: user_plain
+#          cipherColumn: user_cipher
+#          encryptor: encryptor_aes
+#        order_id:
+#          cipherColumn: order_encrypt
+#          encryptor: encryptor_md5
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: encrypt_db
+
+dataSource:
+  url: jdbc:postgresql://localhost:5432/demo_ds?serverTimezone=UTC&useSSL=false
+  username: postgres
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 50
+
+encryptRule:
+  encryptors:
+    encryptor_aes:
+      type: aes
+      props:
+        aes.key.value: 123456abc
+    encryptor_md5:
+      type: md5
+  tables:
+    t_user:
+      columns:
+        user_name:
+          plainColumn: user_name
+          cipherColumn: user_name_cipher
+          encryptor: encryptor_md5
+
+        pwd:
+          plainColumn: pwd_plain
+          cipherColumn: pwd_cipher
+          encryptor: encryptor_md5
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-master-slave.yaml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-master-slave.yaml
new file mode 100644
index 0000000..7ec2ba8
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-master-slave.yaml
@@ -0,0 +1,102 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+######################################################################################################
+#
+#schemaName: master_slave_db
+#
+#dataSources:
+#  master_ds:
+#    url: jdbc:postgresql://localhost:5432/demo_master_ds?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_slave_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_slave_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#masterSlaveRule:
+#  name: ms_ds
+#  masterDataSourceName: master_ds
+#  slaveDataSourceNames:
+#    - slave_ds_0
+#    - slave_ds_1
+
+######################################################################################################
+#
+# If you want to connect to postgresql, you should manually copy postgresql driver to lib directory.
+#
+######################################################################################################
+
+schemaName: master_slave_db
+
+dataSources:
+  master_ds:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  slave_ds_0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_slave_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  slave_ds_1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_slave_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+masterSlaveRule:
+  name: ds_ms
+  masterDataSourceName: master_ds
+  slaveDataSourceNames:
+    - slave_ds_0
+    - slave_ds_1
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-encrypt.yaml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-encrypt.yaml
new file mode 100644
index 0000000..44e319d
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-encrypt.yaml
@@ -0,0 +1,58 @@
+schemaName: sharding_encrypt
+
+dataSources:
+  ds_0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultTableStrategy:
+    none:
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-master-slave-encrypt.yaml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-master-slave-encrypt.yaml
new file mode 100644
index 0000000..440acca
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-master-slave-encrypt.yaml
@@ -0,0 +1,135 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_encrypt_db
+
+dataSources:
+  ds_master_0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_0_slave_0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_0_slave_1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_1_slave_0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_1_slave_1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultTableStrategy:
+    none:
+  defaultDatabaseStrategy:
+    none:
+
+  masterSlaveRules:
+    ds_0:
+      masterDataSourceName: ds_master_0
+      slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ds_1:
+      masterDataSourceName: ds_master_1
+      slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
+        
\ No newline at end of file
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-master-slave.yaml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-master-slave.yaml
new file mode 100644
index 0000000..83c4d11
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-master-slave.yaml
@@ -0,0 +1,132 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_db
+
+dataSources:
+  ds0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+
+shardingRule:
+  tables:
+    t_order:
+      actualDataNodes: ms_ds${0..1}.t_order_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+    t_order_item:
+      actualDataNodes: ms_ds${0..1}.t_order_item_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+  bindingTables:
+    - t_order,t_order_item
+
+  defaultDataSourceName: ds0
+  defaultTableStrategy:
+    none:
+
+  masterSlaveRules:
+    ms_ds0:
+      masterDataSourceName: ds0
+      slaveDataSourceNames:
+        - ds0_slave0
+        - ds0_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ms_ds1:
+      masterDataSourceName: ds1
+      slaveDataSourceNames:
+        - ds1_slave0
+        - ds1_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
\ No newline at end of file
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding.yaml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding.yaml
new file mode 100644
index 0000000..16a3a41
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding.yaml
@@ -0,0 +1,140 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of sharding rule.
+#   
+# If you want to use sharding, please refer to this file; 
+# if you want to use master-slave, please refer to the config-master_slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: sharding_db
+#
+#dataSources:
+#  ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#shardingRule:
+#  tables:
+#    t_order:
+#      actualDataNodes: ds_${0..1}.t_order_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_id
+#    t_order_item:
+#      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_item_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_item_id
+#  bindingTables:
+#    - t_order,t_order_item
+#  defaultDatabaseStrategy:
+#    inline:
+#      shardingColumn: user_id
+#      algorithmExpression: ds_${user_id % 2}
+#  defaultTableStrategy:
+#    none:
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSources:
+  ds_0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_1?serverTimezone=UTC&useSSL=false?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+  tables:
+    t_address:
+      actualDataNodes: ds_${0..1}.t_address
+    t_order:
+      actualDataNodes: ds_${0..1}.t_order_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+    t_order_item:
+      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+  bindingTables:
+    - t_order,t_order_item
+  broadcastTables:
+    - t_address
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/logback.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/logback.xml
new file mode 100644
index 0000000..923ad64
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/logback.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<configuration>
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <logger name="org.apache.shardingsphere" level="info" additivity="false">
+        <appender-ref ref="console"/>
+    </logger>
+
+    <root>
+        <level value="info"/>
+        <appender-ref ref="console"/>
+    </root>
+</configuration> 
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/server.yaml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/server.yaml
new file mode 100644
index 0000000..498afc8
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/conf/server.yaml
@@ -0,0 +1,31 @@
+######################################################################################################
+#
+# If you want to configure orchestration, authorization and proxy properties, please refer to this file.
+#
+######################################################################################################
+
+orchestration:
+  name: orchestration_ds
+  overwrite: false
+  registry:
+    type: zookeeper
+    serverLists: localhost:2181
+    namespace: orchestration
+
+authentication:
+  users:
+    root:
+      password:
+
+props:
+  max.connections.size.per.query: 1
+  acceptor.size: 16  # The default value is available processors count * 2.
+  executor.size: 16  # Infinite by default.
+  proxy.frontend.flush.threshold: 128  # The default value is 128.
+    # LOCAL: Proxy will run with LOCAL transaction.
+  # XA: Proxy will run with XA transaction.
+  # BASE: Proxy will run with B.A.S.E transaction.
+  proxy.transaction.type: LOCAL
+  proxy.opentracing.enabled: false
+  query.with.cipher.column: true
+  sql.show: true
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/logback.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/logback.xml
new file mode 100644
index 0000000..9827392
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-boot-mybatis-postgresql-example/src/test/resources/logback.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <property name="log.context.name" value="sharding-proxy-boot-mybatis-example"/>
+    <property name="log.charset" value="UTF-8"/>
+    <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n"/>
+    <contextName>${log.context.name}</contextName>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder charset="${log.charset}">
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+
+    <root>
+        <level value="info"/>
+        <appender-ref ref="STDOUT"/>
+    </root>
+</configuration>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/pom.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/pom.xml
new file mode 100644
index 0000000..54ad95f
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/pom.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>proxy-orchestration-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example</artifactId>
+
+    <name>AcceptanceTest::proxy::orchestration::mysql::spring-namespace-mybatis</name>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.7</maven.compiler.source>
+        <maven.compiler.target>1.7</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-spring-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-jdbc-spring-namespace</artifactId>
+            <version>${shardingsphere.version}</version>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
new file mode 100644
index 0000000..07e9d26
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-encrypt.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
new file mode 100644
index 0000000..db9dc32
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceMasterSlaveTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-master-slave.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
new file mode 100644
index 0000000..b81d61d
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingEncryptTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-sharding-encrypt.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..16edace
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave-encrypt.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
new file mode 100644
index 0000000..889f59b
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
new file mode 100644
index 0000000..22bea65
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-sharding-databases-tables.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingDatabaseAndTableResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-encrypt.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-encrypt.xml
new file mode 100644
index 0000000..8fad128
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-encrypt.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3307/encrypt_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-master-slave.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-master-slave.xml
new file mode 100644
index 0000000..9a59223
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-master-slave.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans 
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3307/master_slave_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
new file mode 100644
index 0000000..c6ead5b
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                         
+                        
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3307/sharding_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-encrypt.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
new file mode 100644
index 0000000..2aaee1d
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                         
+                        
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3307/sharding_encrypt?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
new file mode 100644
index 0000000..b69eab1
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3307/sharding_master_slave_encrypt_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
new file mode 100644
index 0000000..ffbca0c
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3307/sharding_master_slave_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/logback.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/logback.xml
new file mode 100644
index 0000000..dddfd63
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-mysql-example/src/test/resources/logback.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <property name="log.context.name" value="sharding-jdbc-spring-namespace-mybatis-quickstart"/>
+    <property name="log.charset" value="UTF-8"/>
+    <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n"/>
+    <contextName>${log.context.name}</contextName>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder charset="${log.charset}">
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+    <root>
+        <level value="INFO"/>
+        <appender-ref ref="STDOUT"/>
+    </root>
+</configuration>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/pom.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/pom.xml
new file mode 100644
index 0000000..63367eb
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/pom.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>proxy-orchestration-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example</artifactId>
+    <version>4.0.0-RC4-SNAPSHOT</version>
+
+    <name>AcceptanceTest::proxy::orchestration::postgresql::spring-namespace-mybatis</name>
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.7</maven.compiler.source>
+        <maven.compiler.target>1.7</maven.compiler.target>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-spring-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-jdbc-spring-namespace</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <version>42.2.5</version>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
new file mode 100644
index 0000000..07e9d26
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-encrypt.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
new file mode 100644
index 0000000..db9dc32
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceMasterSlaveTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-master-slave.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
new file mode 100644
index 0000000..b81d61d
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingEncryptTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-sharding-encrypt.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..16edace
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave-encrypt.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
new file mode 100644
index 0000000..889f59b
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
new file mode 100644
index 0000000..c558a6e
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-sharding-databases-tables.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertTempPgExampleServiceShardingResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-encrypt.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-encrypt.xml
new file mode 100644
index 0000000..2a9bdc8
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-encrypt.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:3307/encrypt_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-master-slave.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-master-slave.xml
new file mode 100644
index 0000000..af241c1
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-master-slave.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans 
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:3307/master_slave_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
new file mode 100644
index 0000000..c8f98dd
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                         
+                        
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:3307/sharding_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-encrypt.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
new file mode 100644
index 0000000..fbddcd1
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                         
+                        
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:3307/sharding_encrypt?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
new file mode 100644
index 0000000..b2209ee
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:3307/sharding_master_slave_encrypt_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
new file mode 100644
index 0000000..ab40140
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:3307/sharding_master_slave_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/logback.xml b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/logback.xml
new file mode 100644
index 0000000..dddfd63
--- /dev/null
+++ b/sharding-proxy-example/proxy-orchestration-example/sharding-proxy-orchestration-spring-namespace-mybatis-postgresql-example/src/test/resources/logback.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <property name="log.context.name" value="sharding-jdbc-spring-namespace-mybatis-quickstart"/>
+    <property name="log.charset" value="UTF-8"/>
+    <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n"/>
+    <contextName>${log.context.name}</contextName>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder charset="${log.charset}">
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+    <root>
+        <level value="INFO"/>
+        <appender-ref ref="STDOUT"/>
+    </root>
+</configuration>
diff --git a/sharding-proxy-example/proxy-sharding-example/pom.xml b/sharding-proxy-example/proxy-sharding-example/pom.xml
new file mode 100644
index 0000000..779974e
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>sharding-proxy-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>proxy-sharding-example</artifactId>
+    <name>AcceptanceTest::proxy::sharding::root</name>
+
+    <packaging>pom</packaging>
+
+    <modules>
+
+        <module>sharding-proxy-raw-jdbc-postgresql-example</module>
+        <module>sharding-proxy-raw-jdbc-mysql-example</module>
+        <module>sharding-proxy-spring-boot-mybatis-mysql-example</module>
+        <module>sharding-proxy-spring-boot-mybatis-postgresql-example</module>
+        <module>sharding-proxy-spring-namespace-mybatis-mysql-example</module>
+        <module>sharding-proxy-spring-namespace-mybatis-postgresql-example</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/pom.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/pom.xml
new file mode 100644
index 0000000..c195117
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/pom.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>proxy-sharding-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-proxy-raw-jdbc-mysql-example</artifactId>
+
+    <name>AcceptanceTest::proxy::mysql::sharding::raw-jdbc</name>
+    <!-- FIXME change it to the project's website -->
+    <url>http://www.example.com</url>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.7</maven.compiler.source>
+        <maven.compiler.target>1.7</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.11</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>config-utility</artifactId>
+            <version>${project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-api</artifactId>
+            <version>${project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-raw-jdbc</artifactId>
+            <version>${project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+            <plugins>
+                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+                <plugin>
+                    <artifactId>maven-clean-plugin</artifactId>
+                    <version>3.1.0</version>
+                </plugin>
+                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+                <plugin>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.8.0</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.22.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-install-plugin</artifactId>
+                    <version>2.5.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <version>2.8.2</version>
+                </plugin>
+                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+                <plugin>
+                    <artifactId>maven-site-plugin</artifactId>
+                    <version>3.7.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-project-info-reports-plugin</artifactId>
+                    <version>3.0.0</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+</project>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
new file mode 100644
index 0000000..3b39ab5
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaEncryptTest {
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertEncrypt(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
new file mode 100644
index 0000000..fb76397
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaMasterSlaveTest {
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
new file mode 100644
index 0000000..b908fd3
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingEncrypt(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
new file mode 100644
index 0000000..c65cf9c
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlave {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
new file mode 100644
index 0000000..ac644f3
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlaveEncrypt {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaveEncrypt(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
new file mode 100644
index 0000000..0c424cc
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.mysql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_DATABASES_AND_TABLES);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingTableDatabases(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
new file mode 100644
index 0000000..7bdbc48
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-mysql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.factory;
+
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.example.type.ShardingType;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class DataSourceFactory {
+    
+    public static DataSource newInstance(final ShardingType shardingType) throws SQLException {
+        switch (shardingType) {
+            case SHARDING_ENCRYPT:
+                return DataSourceUtil.createDataSource("sharding_encrypt", DatabaseType.PROXY_MYSQL);
+            case SHARDING_DATABASES_AND_TABLES:
+                return DataSourceUtil.createDataSource("sharding_db", DatabaseType.PROXY_MYSQL);
+            case MASTER_SLAVE:
+                return DataSourceUtil.createDataSource("master_slave_db", DatabaseType.PROXY_MYSQL);
+            case SHARDING_MASTER_SLAVE:
+                return DataSourceUtil.createDataSource("sharding_master_slave_db", DatabaseType.PROXY_MYSQL);
+            case SHARDING_MASTER_SLAVE_ENCRYPT:
+                return DataSourceUtil.createDataSource("sharding_master_slave_encrypt_db", DatabaseType.PROXY_MYSQL);
+            case ENCRYPT:
+                return DataSourceUtil.createDataSource("encrypt_db", DatabaseType.PROXY_MYSQL);
+            default:
+                throw new UnsupportedOperationException(shardingType.name());
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/pom.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/pom.xml
new file mode 100644
index 0000000..f2ce60f
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/pom.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>proxy-sharding-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-proxy-raw-jdbc-postgresql-example</artifactId>
+
+    <name>AcceptanceTest::proxy::postgresql::sharding::raw-jdbc</name>
+    <!-- FIXME change it to the project's website -->
+    <url>http://www.example.com</url>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.7</maven.compiler.source>
+        <maven.compiler.target>1.7</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.11</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>config-utility</artifactId>
+            <version>${project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-api</artifactId>
+            <version>${project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-raw-jdbc</artifactId>
+            <version>${project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+            <plugins>
+                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+                <plugin>
+                    <artifactId>maven-clean-plugin</artifactId>
+                    <version>3.1.0</version>
+                </plugin>
+                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+                <plugin>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.8.0</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.22.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-install-plugin</artifactId>
+                    <version>2.5.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <version>2.8.2</version>
+                </plugin>
+                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+                <plugin>
+                    <artifactId>maven-site-plugin</artifactId>
+                    <version>3.7.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-project-info-reports-plugin</artifactId>
+                    <version>3.0.0</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+</project>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
new file mode 100644
index 0000000..3f309cf
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaEncryptTest {
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertEncrypt(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
new file mode 100644
index 0000000..2292636
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaMasterSlaveTest.java
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaMasterSlaveTest {
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
new file mode 100644
index 0000000..83ffa23
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingEncryptTest.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingEncryptTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingEncrypt(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
new file mode 100644
index 0000000..1fab281
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlave.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlave {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaves(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
new file mode 100644
index 0000000..9330b8f
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingMasterSlaveEncrypt.java
@@ -0,0 +1,23 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.UserRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingMasterSlaveEncrypt {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_MASTER_SLAVE_ENCRYPT);
+        ExampleService exampleService = new UserServiceImpl(new UserRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertShardingMasterSlaveEncrypt(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
new file mode 100644
index 0000000..43d9dfe
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/RawJDBCJavaShardingTest.java
@@ -0,0 +1,25 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.jdbc.common.RawJdbcAssertUtils;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.AddressRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderItemRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.repository.postgresql.OrderRepositoryImpl;
+import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
+import org.apache.shardingsphere.example.factory.DataSourceFactory;
+import org.apache.shardingsphere.example.type.ShardingType;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class RawJDBCJavaShardingTest {
+    @Test
+    public void assertCommonService() throws SQLException {
+        DataSource dataSource = DataSourceFactory.newInstance(ShardingType.SHARDING_DATABASES_AND_TABLES);
+        ExampleService exampleService = new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource), new AddressRepositoryImpl(dataSource));
+        ExampleExecuteTemplate.run(exampleService);
+        RawJdbcAssertUtils.assertPgTempShardingTableDatabases(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
new file mode 100644
index 0000000..12cbf4c
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-raw-jdbc-postgresql-example/src/test/java/org/apache/shardingsphere/example/factory/DataSourceFactory.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.factory;
+
+import org.apache.shardingsphere.example.core.api.DataSourceUtil;
+import org.apache.shardingsphere.example.core.api.DatabaseType;
+import org.apache.shardingsphere.example.type.ShardingType;
+
+import javax.sql.DataSource;
+import java.sql.SQLException;
+
+public class DataSourceFactory {
+    
+    public static DataSource newInstance(final ShardingType shardingType) throws SQLException {
+        switch (shardingType) {
+            case SHARDING_ENCRYPT:
+                return DataSourceUtil.createDataSource("sharding_encrypt", DatabaseType.PROXY_POSTGRESQL);
+            case SHARDING_DATABASES_AND_TABLES:
+                return DataSourceUtil.createDataSource("sharding_db", DatabaseType.PROXY_POSTGRESQL);
+            case MASTER_SLAVE:
+                return DataSourceUtil.createDataSource("master_slave_db", DatabaseType.PROXY_POSTGRESQL);
+            case SHARDING_MASTER_SLAVE:
+                return DataSourceUtil.createDataSource("sharding_master_slave_db", DatabaseType.PROXY_POSTGRESQL);
+            case SHARDING_MASTER_SLAVE_ENCRYPT:
+                return DataSourceUtil.createDataSource("sharding_master_slave_encrypt_db", DatabaseType.PROXY_POSTGRESQL);
+            case ENCRYPT:
+                return DataSourceUtil.createDataSource("encrypt_db", DatabaseType.PROXY_POSTGRESQL);
+            default:
+                throw new UnsupportedOperationException(shardingType.name());
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/pom.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/pom.xml
new file mode 100644
index 0000000..c2c1f8e
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/pom.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>proxy-sharding-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-proxy-boot-mybatis-mysql-example</artifactId>
+    <name>AcceptanceTest::proxy::mysql::spring-boot-mybatis</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-spring-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootEncryptTest.java
new file mode 100644
index 0000000..612fd73
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootEncryptTest.java
@@ -0,0 +1,31 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("encrypt")
+public class SpringBootEncryptTest {
+    
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+    
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootMasterSlaveTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootMasterSlaveTest.java
new file mode 100644
index 0000000..e65c443
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootMasterSlaveTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("master-slave")
+public class SpringBootMasterSlaveTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario.process1(commonService);
+        SpringResultAssertUtils.assertMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingDatabasesTablesTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingDatabasesTablesTest.java
new file mode 100644
index 0000000..adb9fad
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingDatabasesTablesTest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-databases-tables")
+public class SpringBootShardingDatabasesTablesTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario.process1(commonService);
+        SpringResultAssertUtils.assertShardingDatabaseAndTableResult(commonService);
+    }
+    
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingEncryptTest.java
new file mode 100644
index 0000000..122eb09
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingEncryptTest.java
@@ -0,0 +1,31 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-encrypt")
+public class SpringBootShardingEncryptTest {
+    
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+    
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingMasterSlaveEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..f29c21c
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,31 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-ms-encrypt")
+public class SpringBootShardingMasterSlaveEncryptTest {
+    
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+    
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootTestMain.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootTestMain.java
new file mode 100644
index 0000000..036b725
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootTestMain.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
+import org.springframework.context.annotation.ComponentScan;
+
+@ComponentScan("org.apache.shardingsphere.example")
+@MapperScan(basePackages = "org.apache.shardingsphere.example.core.mybatis.repository")
+@SpringBootApplication(exclude = JtaAutoConfiguration.class)
+public class SpringBootTestMain {
+    
+    public static void main(final String[] args) {
+        SpringApplication.run(SpringBootTestMain.class, args);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootsShardingMasterSlaveTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootsShardingMasterSlaveTest.java
new file mode 100644
index 0000000..9e4a316
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringBootsShardingMasterSlaveTest.java
@@ -0,0 +1,29 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.SpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-master-slave")
+public class SpringBootsShardingMasterSlaveTest {
+    
+    @Autowired
+    private SpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/META-INF/mybatis-config.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/META-INF/mybatis-config.xml
new file mode 100644
index 0000000..e450f2f
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/META-INF/mybatis-config.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <mappers>
+        <mapper resource="META-INF/mappers/mysql/AddressMapper.xml"/>
+        <mapper resource="META-INF/mappers/mysql/OrderMapper.xml"/>
+        <mapper resource="META-INF/mappers/mysql/OrderItemMapper.xml"/>
+        <mapper resource="META-INF/mappers/mysql/UserMapper.xml"/>
+    </mappers>
+</configuration>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-encrypt.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-encrypt.properties
new file mode 100644
index 0000000..920e94f
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-encrypt.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://localhost:3307/encrypt_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-master-slave.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-master-slave.properties
new file mode 100644
index 0000000..e90ef75
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-master-slave.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://localhost:3307/master_slave_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-databases-tables.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-databases-tables.properties
new file mode 100644
index 0000000..c6b463b
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-databases-tables.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://localhost:3307/sharding_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-encrypt.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-encrypt.properties
new file mode 100644
index 0000000..c6f20b4
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-encrypt.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://localhost:3307/sharding_encrypt?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave.properties
new file mode 100644
index 0000000..08a84af
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-master-slave.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://localhost:3307/sharding_master_slave_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-ms-encrypt.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-ms-encrypt.properties
new file mode 100644
index 0000000..444c3da
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application-sharding-ms-encrypt.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://localhost:3307/sharding_master_slave_encrypt_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application.properties
new file mode 100644
index 0000000..5854387
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/application.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+#spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+#spring.datasource.url=jdbc:mysql://localhost:3307/encrypt_db?useServerPrepStmts=true&cachePrepStmts=true
+#spring.datasource.username=root
+#spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-encrypt.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-encrypt.yaml
new file mode 100644
index 0000000..66c4b66
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-encrypt.yaml
@@ -0,0 +1,97 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: encrypt_db
+#
+#dataSource:
+#  url: jdbc:postgresql://localhost:5432/demo_ds?serverTimezone=UTC&useSSL=false
+#  username: postgres
+#  password: postgres
+#  connectionTimeoutMilliseconds: 30000
+#  idleTimeoutMilliseconds: 60000
+#  maxLifetimeMilliseconds: 1800000
+#  maxPoolSize: 50
+#
+#encryptRule:
+#  encryptors:
+#    encryptor_aes:
+#      type: aes
+#      props:
+#        aes.key.value: 123456abc
+#    encryptor_md5:
+#      type: md5
+#  tables:
+#    t_encrypt:
+#      columns:
+#        user_id:
+#          plainColumn: user_plain
+#          cipherColumn: user_cipher
+#          encryptor: encryptor_aes
+#        order_id:
+#          cipherColumn: order_encrypt
+#          encryptor: encryptor_md5
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: encrypt_db
+
+dataSource:
+  url: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false
+  username: root
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 50
+
+encryptRule:
+  encryptors:
+    encryptor_aes:
+      type: aes
+      props:
+        aes.key.value: 123456abc
+    encryptor_md5:
+      type: md5
+  tables:
+    t_user:
+      columns:
+        user_name:
+          plainColumn: user_name
+          cipherColumn: user_name_cipher
+          encryptor: encryptor_md5
+
+        pwd:
+          plainColumn: pwd_plain
+          cipherColumn: pwd_cipher
+          encryptor: encryptor_md5
+
+       
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-master-slave.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-master-slave.yaml
new file mode 100644
index 0000000..f67644a
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-master-slave.yaml
@@ -0,0 +1,102 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+######################################################################################################
+#
+#schemaName: master_slave_db
+#
+#dataSources:
+#  master_ds:
+#    url: jdbc:postgresql://localhost:5432/demo_master_ds?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_slave_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_slave_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#masterSlaveRule:
+#  name: ms_ds
+#  masterDataSourceName: master_ds
+#  slaveDataSourceNames:
+#    - slave_ds_0
+#    - slave_ds_1
+
+######################################################################################################
+#
+# If you want to connect to postgresql, you should manually copy postgresql driver to lib directory.
+#
+######################################################################################################
+
+schemaName: master_slave_db
+
+dataSources:
+  master_ds:
+    url: jdbc:mysql://localhost:3306/demo_ds_master?useUnicode=true&characterEncoding=utf-8
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  slave_ds_0:
+    url: jdbc:mysql://localhost:3306/demo_ds_slave_0?useUnicode=true&characterEncoding=utf-8
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  slave_ds_1:
+    url: jdbc:mysql://localhost:3306/demo_ds_slave_1?useUnicode=true&characterEncoding=utf-8
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+masterSlaveRule:
+  name: ds_ms
+  masterDataSourceName: master_ds
+  slaveDataSourceNames:
+    - slave_ds_0
+    - slave_ds_1
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-encrypt.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-encrypt.yaml
new file mode 100644
index 0000000..7080015
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-encrypt.yaml
@@ -0,0 +1,60 @@
+schemaName: sharding_encrypt
+
+dataSources:
+  ds_0:
+    url: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-master-slave-encrypt.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-master-slave-encrypt.yaml
new file mode 100644
index 0000000..93b541e
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-master-slave-encrypt.yaml
@@ -0,0 +1,135 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_encrypt_db
+
+dataSources:
+  ds_master_0:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_0_slave_0:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_0_slave_1:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_1:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_1_slave_0:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_1_slave_1:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultTableStrategy:
+    none:
+  defaultDatabaseStrategy:
+    none:
+
+  masterSlaveRules:
+    ds_0:
+      masterDataSourceName: ds_master_0
+      slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ds_1:
+      masterDataSourceName: ds_master_1
+      slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
+        
\ No newline at end of file
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-master-slave.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-master-slave.yaml
new file mode 100644
index 0000000..54e7ccb
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding-master-slave.yaml
@@ -0,0 +1,132 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_db
+
+dataSources:
+  ds0:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave0:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave1:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave0:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave1:
+    url: jdbc:mysql://localhost:3306/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+
+shardingRule:
+  tables:
+    t_order:
+      actualDataNodes: ms_ds${0..1}.t_order_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+    t_order_item:
+      actualDataNodes: ms_ds${0..1}.t_order_item_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+  bindingTables:
+    - t_order,t_order_item
+
+  defaultDataSourceName: ds0
+  defaultTableStrategy:
+    none:
+
+  masterSlaveRules:
+    ms_ds0:
+      masterDataSourceName: ds0
+      slaveDataSourceNames:
+        - ds0_slave0
+        - ds0_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ms_ds1:
+      masterDataSourceName: ds1
+      slaveDataSourceNames:
+        - ds1_slave0
+        - ds1_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
\ No newline at end of file
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding.yaml
new file mode 100644
index 0000000..48b940f
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/config-sharding.yaml
@@ -0,0 +1,140 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of sharding rule.
+#   
+# If you want to use sharding, please refer to this file; 
+# if you want to use master-slave, please refer to the config-master_slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: sharding_db
+#
+#dataSources:
+#  ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#shardingRule:
+#  tables:
+#    t_order:
+#      actualDataNodes: ds_${0..1}.t_order_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_id
+#    t_order_item:
+#      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_item_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_item_id
+#  bindingTables:
+#    - t_order,t_order_item
+#  defaultDatabaseStrategy:
+#    inline:
+#      shardingColumn: user_id
+#      algorithmExpression: ds_${user_id % 2}
+#  defaultTableStrategy:
+#    none:
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSources:
+  ds_0:
+    url: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+  tables:
+    t_address:
+      actualDataNodes: ds_${0..1}.t_address
+    t_order:
+      actualDataNodes: ds_${0..1}.t_order_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+    t_order_item:
+      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+  bindingTables:
+    - t_order,t_order_item
+  broadcastTables:
+    - t_address
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/logback.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/logback.xml
new file mode 100644
index 0000000..923ad64
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/logback.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<configuration>
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <logger name="org.apache.shardingsphere" level="info" additivity="false">
+        <appender-ref ref="console"/>
+    </logger>
+
+    <root>
+        <level value="info"/>
+        <appender-ref ref="console"/>
+    </root>
+</configuration> 
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/server.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/server.yaml
new file mode 100644
index 0000000..6abfffa
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/conf/server.yaml
@@ -0,0 +1,31 @@
+######################################################################################################
+#
+# If you want to configure orchestration, authorization and proxy properties, please refer to this file.
+#
+######################################################################################################
+
+#orchestration:
+#  name: orchestration_ds
+#  overwrite: true
+#  registry:
+#    type: zookeeper
+#    serverLists: localhost:2181
+#    namespace: orchestration
+
+authentication:
+  users:
+    root:
+      password:
+
+props:
+  max.connections.size.per.query: 1
+  acceptor.size: 16  # The default value is available processors count * 2.
+  executor.size: 16  # Infinite by default.
+  proxy.frontend.flush.threshold: 128  # The default value is 128.
+  # LOCAL: Proxy will run with LOCAL transaction.
+  # XA: Proxy will run with XA transaction.
+  # BASE: Proxy will run with B.A.S.E transaction.
+  proxy.transaction.type: LOCAL
+  proxy.opentracing.enabled: false
+  query.with.cipher.column: true
+  sql.show: false
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/logback.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/logback.xml
new file mode 100644
index 0000000..9827392
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-mysql-example/src/test/resources/logback.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <property name="log.context.name" value="sharding-proxy-boot-mybatis-example"/>
+    <property name="log.charset" value="UTF-8"/>
+    <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n"/>
+    <contextName>${log.context.name}</contextName>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder charset="${log.charset}">
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+
+    <root>
+        <level value="info"/>
+        <appender-ref ref="STDOUT"/>
+    </root>
+</configuration>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/pom.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/pom.xml
new file mode 100644
index 0000000..0f21308
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>proxy-sharding-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-proxy-boot-mybatis-postgresql-example</artifactId>
+    <name>AcceptanceTest::proxy::postgresql::spring-boot-mybatis</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-spring-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <version>42.2.5</version>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootEncryptTest.java
new file mode 100644
index 0000000..612fd73
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootEncryptTest.java
@@ -0,0 +1,31 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("encrypt")
+public class SpringBootEncryptTest {
+    
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+    
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootMasterSlaveTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootMasterSlaveTest.java
new file mode 100644
index 0000000..4f1e4ff
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootMasterSlaveTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.TempPgSpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("master-slave")
+public class SpringBootMasterSlaveTest {
+    
+    @Autowired
+    private TempPgSpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario.process1(commonService);
+        SpringResultAssertUtils.assertMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingDatabasesTablesTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingDatabasesTablesTest.java
new file mode 100644
index 0000000..4700f4d
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingDatabasesTablesTest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.TempPgSpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-databases-tables")
+public class SpringBootShardingDatabasesTablesTest {
+    
+    @Autowired
+    private TempPgSpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario.process1(commonService);
+        SpringResultAssertUtils.assertTempPgShardingDatabaseAndTableResult(commonService);
+    }
+    
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingEncryptTest.java
new file mode 100644
index 0000000..122eb09
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootShardingEncryptTest.java
@@ -0,0 +1,31 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.sql.SQLException;
+
+/**
+ * @author linzesi
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-encrypt")
+public class SpringBootShardingEncryptTest {
+    
+    @Resource(name = "encrypt")
+    ExampleService exampleService;
+    
+    @Test
+    public void commonService() throws SQLException {
+        ExampleExecuteTemplate.run(exampleService);
+        SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootTestMain.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootTestMain.java
new file mode 100644
index 0000000..036b725
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootTestMain.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
+import org.springframework.context.annotation.ComponentScan;
+
+@ComponentScan("org.apache.shardingsphere.example")
+@MapperScan(basePackages = "org.apache.shardingsphere.example.core.mybatis.repository")
+@SpringBootApplication(exclude = JtaAutoConfiguration.class)
+public class SpringBootTestMain {
+    
+    public static void main(final String[] args) {
+        SpringApplication.run(SpringBootTestMain.class, args);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootsShardingMasterSlaveTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootsShardingMasterSlaveTest.java
new file mode 100644
index 0000000..79b5252
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringBootsShardingMasterSlaveTest.java
@@ -0,0 +1,29 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.senario.AnnotationCommonServiceScenario;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.TempPgSpringPojoService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.SQLException;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootTestMain.class)
+@ActiveProfiles("sharding-master-slave")
+public class SpringBootsShardingMasterSlaveTest {
+    
+    @Autowired
+    private TempPgSpringPojoService commonService;
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        AnnotationCommonServiceScenario scenario = new AnnotationCommonServiceScenario(commonService);
+        scenario.process();
+        SpringResultAssertUtils.assertShardingMasterSlaveResult(commonService);
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/META-INF/mybatis-config.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/META-INF/mybatis-config.xml
new file mode 100644
index 0000000..730d2f1
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/META-INF/mybatis-config.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <mappers>
+        <mapper resource="META-INF/mappers/postgresql/AddressMapper.xml"/>
+        <mapper resource="META-INF/mappers/postgresql/OrderMapper.xml"/>
+        <mapper resource="META-INF/mappers/postgresql/OrderItemMapper.xml"/>
+        <mapper resource="META-INF/mappers/postgresql/UserMapper.xml"/>
+    </mappers>
+</configuration>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-encrypt.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-encrypt.properties
new file mode 100644
index 0000000..a15d239
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-encrypt.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:3307/encrypt_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave-encrypt.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave-encrypt.properties
new file mode 100644
index 0000000..abec744
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave-encrypt.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:3307/master_slave_encrypt?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave.properties
new file mode 100644
index 0000000..35dd26e
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-master-slave.properties
@@ -0,0 +1,7 @@
+#logging.level.org.apache.shardingsphere.example.core.mybatis=debug
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:3307/master_slave_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-databases-tables.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-databases-tables.properties
new file mode 100644
index 0000000..0339c4c
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-databases-tables.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:3307/sharding_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-encrypt.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-encrypt.properties
new file mode 100644
index 0000000..4bb05f2
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-encrypt.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:3307/sharding_encrypt?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-master-slave.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-master-slave.properties
new file mode 100644
index 0000000..01f80b2
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-master-slave.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:3307/sharding_master_slave_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-ms-encrypt.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-ms-encrypt.properties
new file mode 100644
index 0000000..5e5e445
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application-sharding-ms-encrypt.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:3307/sharding_master_slave_encrypt_db?useServerPrepStmts=true&cachePrepStmts=true
+spring.datasource.username=root
+spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application.properties b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application.properties
new file mode 100644
index 0000000..9aaf5f1
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/application.properties
@@ -0,0 +1,6 @@
+mybatis.config-location=classpath:META-INF/mybatis-config.xml
+#spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+#spring.datasource.driver-class-name=org.postgresql.Driver
+#spring.datasource.url=jdbc:mysql://localhost:3307/encrypt_db?useServerPrepStmts=true&cachePrepStmts=true
+#spring.datasource.username=postgres
+#spring.datasource.password=
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-encrypt.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-encrypt.yaml
new file mode 100644
index 0000000..eb3f436
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-encrypt.yaml
@@ -0,0 +1,95 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: encrypt_db
+#
+#dataSource:
+#  url: jdbc:postgresql://localhost:5432/demo_ds?serverTimezone=UTC&useSSL=false
+#  username: postgres
+#  password: postgres
+#  connectionTimeoutMilliseconds: 30000
+#  idleTimeoutMilliseconds: 60000
+#  maxLifetimeMilliseconds: 1800000
+#  maxPoolSize: 50
+#
+#encryptRule:
+#  encryptors:
+#    encryptor_aes:
+#      type: aes
+#      props:
+#        aes.key.value: 123456abc
+#    encryptor_md5:
+#      type: md5
+#  tables:
+#    t_encrypt:
+#      columns:
+#        user_id:
+#          plainColumn: user_plain
+#          cipherColumn: user_cipher
+#          encryptor: encryptor_aes
+#        order_id:
+#          cipherColumn: order_encrypt
+#          encryptor: encryptor_md5
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: encrypt_db
+
+dataSource:
+  url: jdbc:postgresql://localhost:5432/demo_ds?serverTimezone=UTC&useSSL=false
+  username: postgres
+  password:
+  connectionTimeoutMilliseconds: 30000
+  idleTimeoutMilliseconds: 60000
+  maxLifetimeMilliseconds: 1800000
+  maxPoolSize: 50
+
+encryptRule:
+  encryptors:
+    encryptor_aes:
+      type: aes
+      props:
+        aes.key.value: 123456abc
+    encryptor_md5:
+      type: md5
+  tables:
+    t_user:
+      columns:
+        user_name:
+          plainColumn: user_name
+          cipherColumn: user_name_cipher
+          encryptor: encryptor_md5
+
+        pwd:
+          plainColumn: pwd_plain
+          cipherColumn: pwd_cipher
+          encryptor: encryptor_md5
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-master-slave.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-master-slave.yaml
new file mode 100644
index 0000000..7ec2ba8
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-master-slave.yaml
@@ -0,0 +1,102 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+#
+# Here you can configure the rules for the proxy.
+# This example is configuration of master-slave rule.
+#
+# If you want to use master-slave, please refer to this file;
+# if you want to use sharding, please refer to the config-sharding.yaml.
+#
+######################################################################################################
+#
+#schemaName: master_slave_db
+#
+#dataSources:
+#  master_ds:
+#    url: jdbc:postgresql://localhost:5432/demo_master_ds?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_slave_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  slave_ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_slave_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#masterSlaveRule:
+#  name: ms_ds
+#  masterDataSourceName: master_ds
+#  slaveDataSourceNames:
+#    - slave_ds_0
+#    - slave_ds_1
+
+######################################################################################################
+#
+# If you want to connect to postgresql, you should manually copy postgresql driver to lib directory.
+#
+######################################################################################################
+
+schemaName: master_slave_db
+
+dataSources:
+  master_ds:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  slave_ds_0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_slave_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  slave_ds_1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_slave_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+masterSlaveRule:
+  name: ds_ms
+  masterDataSourceName: master_ds
+  slaveDataSourceNames:
+    - slave_ds_0
+    - slave_ds_1
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-encrypt.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-encrypt.yaml
new file mode 100644
index 0000000..44e319d
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-encrypt.yaml
@@ -0,0 +1,58 @@
+schemaName: sharding_encrypt
+
+dataSources:
+  ds_0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultTableStrategy:
+    none:
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-master-slave-encrypt.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-master-slave-encrypt.yaml
new file mode 100644
index 0000000..440acca
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-master-slave-encrypt.yaml
@@ -0,0 +1,135 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_encrypt_db
+
+dataSources:
+  ds_master_0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_0_slave_0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_0_slave_1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_1_slave_0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds_master_1_slave_1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+
+shardingRule:
+  tables:
+    t_user:
+      actualDataNodes: ds_${0..1}.t_user_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: t_user_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: user_id
+  defaultTableStrategy:
+    none:
+  defaultDatabaseStrategy:
+    none:
+
+  masterSlaveRules:
+    ds_0:
+      masterDataSourceName: ds_master_0
+      slaveDataSourceNames: [ds_master_0_slave_0, ds_master_0_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ds_1:
+      masterDataSourceName: ds_master_1
+      slaveDataSourceNames: [ds_master_1_slave_0, ds_master_1_slave_1]
+      loadBalanceAlgorithmType: ROUND_ROBIN
+
+  encryptRule:
+    encryptors:
+      encryptor_aes:
+        type: aes
+        props:
+          aes.key.value: 123456abc
+      encryptor_md5:
+        type: md5
+    tables:
+      t_user:
+        columns:
+          user_name:
+            plainColumn: user_name
+            cipherColumn: user_name_cipher
+            encryptor: encryptor_md5
+
+          pwd:
+            plainColumn: pwd_plain
+            cipherColumn: pwd_cipher
+            encryptor: encryptor_md5
+        
\ No newline at end of file
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-master-slave.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-master-slave.yaml
new file mode 100644
index 0000000..83c4d11
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-master-slave.yaml
@@ -0,0 +1,132 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of encrypt rule.
+#   
+# If you want to use encrypt, please refer to this file; 
+# if you want to use sharding, please refer to the config-sharding.yaml.
+# if you want to use master-slave, please refer to the config-master-slave.yaml.
+# 
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+#
+schemaName: sharding_master_slave_db
+
+dataSources:
+  ds0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds0_slave1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_0_slave_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_1_slave_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+  ds1_slave1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_master_1_slave_1?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 65
+
+shardingRule:
+  tables:
+    t_order:
+      actualDataNodes: ms_ds${0..1}.t_order_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+    t_order_item:
+      actualDataNodes: ms_ds${0..1}.t_order_item_${0..1}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ms_ds${user_id % 2}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+  bindingTables:
+    - t_order,t_order_item
+
+  defaultDataSourceName: ds0
+  defaultTableStrategy:
+    none:
+
+  masterSlaveRules:
+    ms_ds0:
+      masterDataSourceName: ds0
+      slaveDataSourceNames:
+        - ds0_slave0
+        - ds0_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
+    ms_ds1:
+      masterDataSourceName: ds1
+      slaveDataSourceNames:
+        - ds1_slave0
+        - ds1_slave1
+      loadBalanceAlgorithmType: ROUND_ROBIN
\ No newline at end of file
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-table.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-table.yaml
new file mode 100644
index 0000000..84896f8
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding-table.yaml
@@ -0,0 +1,187 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of sharding rule.
+#   
+# If you want to use sharding, please refer to this file; 
+# if you want to use master-slave, please refer to the config-master_slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: sharding_db
+#
+#dataSources:
+#  db0:
+#    url: jdbc:postgresql://docker_default:5432/demo_db0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  db1:
+#    url: jdbc:postgresql://docker_default:5432/demo_db1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#shardingRule:
+#  tables:
+#    t_order:
+#      actualDataNodes: db${0..1}.t_order_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_id
+#    t_order_item:
+#      actualDataNodes: db${0..1}.t_order_item_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_item_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_item_id
+#  bindingTables:
+#    - t_order,t_order_item
+#  defaultDatabaseStrategy:
+#    inline:
+#      shardingColumn: user_id
+#      algorithmExpression: db${user_id % 2}
+#  defaultTableStrategy:
+#    none:
+
+######################################################################################################
+#
+# If you want to connect to postgresql, you should manually copy postgresql driver to lib directory.
+#
+######################################################################################################
+
+#schemaName: sharding_db
+#
+#dataSources:
+#  db0:
+#    url: jdbc:postgresql://ceshi.com:5432/demo_db0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601123456
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  db1:
+#    url: jdbc:postgresql://ceshi.com:5432/demo_db1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: 199601123456
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#shardingRule:
+#  tables:
+#    t_order:
+#      actualDataNodes: db${0..1}.t_order_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_id
+#    t_order_item:
+#      actualDataNodes: db${0..1}.t_order_item_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_item_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_item_id
+#  bindingTables:
+#    - t_order,t_order_item
+#  defaultDatabaseStrategy:
+#    inline:
+#      shardingColumn: user_id
+#      algorithmExpression: db${user_id % 2}
+#  defaultTableStrategy:
+#    none:
+#encryptRule:
+#  encryptors:
+#    encryptor_aes:
+#      type: aes
+#      props:
+#        aes.key.value: 123456abc
+#    encryptor_md5:
+#      type: md5
+#  tables:
+#    t_order:
+#      columns:
+#        user_id:
+#          plainColumn: user_id
+#          cipherColumn: user_cipher
+#          encryptor: encryptor_aes
+#        order_id:
+#          cipherColumn: order_cipher
+#          encryptor: encryptor_md5
+
+schemaName: sharding_table
+
+dataSources:
+  ds:
+    url: jdbc:mysql://localhost:3306/demo_ds
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+  tables:
+    t_order:
+      actualDataNodes: ds.t_order_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+    t_order_item:
+      actualDataNodes: ds.t_order_item_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+  bindingTables:
+    - t_order,t_order_item
+  broadcastTables:
+    - t_address
+
+
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding.yaml
new file mode 100644
index 0000000..16a3a41
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/config-sharding.yaml
@@ -0,0 +1,140 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+######################################################################################################
+# 
+# Here you can configure the rules for the proxy.
+# This example is configuration of sharding rule.
+#   
+# If you want to use sharding, please refer to this file; 
+# if you want to use master-slave, please refer to the config-master_slave.yaml.
+# 
+######################################################################################################
+#
+#schemaName: sharding_db
+#
+#dataSources:
+#  ds_0:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_0?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#  ds_1:
+#    url: jdbc:postgresql://localhost:5432/demo_ds_1?serverTimezone=UTC&useSSL=false
+#    username: postgres
+#    password: postgres
+#    connectionTimeoutMilliseconds: 30000
+#    idleTimeoutMilliseconds: 60000
+#    maxLifetimeMilliseconds: 1800000
+#    maxPoolSize: 50
+#
+#shardingRule:
+#  tables:
+#    t_order:
+#      actualDataNodes: ds_${0..1}.t_order_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_id
+#    t_order_item:
+#      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+#      tableStrategy:
+#        inline:
+#          shardingColumn: order_id
+#          algorithmExpression: t_order_item_${order_id % 2}
+#      keyGenerator:
+#        type: SNOWFLAKE
+#        column: order_item_id
+#  bindingTables:
+#    - t_order,t_order_item
+#  defaultDatabaseStrategy:
+#    inline:
+#      shardingColumn: user_id
+#      algorithmExpression: ds_${user_id % 2}
+#  defaultTableStrategy:
+#    none:
+
+######################################################################################################
+#
+# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
+#
+######################################################################################################
+
+schemaName: sharding_db
+
+dataSources:
+  ds_0:
+    url: jdbc:postgresql://localhost:5432/demo_ds_0?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+  ds_1:
+    url: jdbc:postgresql://localhost:5432/demo_ds_1?serverTimezone=UTC&useSSL=false?serverTimezone=UTC&useSSL=false
+    username: postgres
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+
+shardingRule:
+  tables:
+    t_address:
+      actualDataNodes: ds_${0..1}.t_address
+    t_order:
+      actualDataNodes: ds_${0..1}.t_order_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_${order_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_id
+    t_order_item:
+      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+      tableStrategy:
+        inline:
+          shardingColumn: order_id
+          algorithmExpression: t_order_item_${order_id % 2}
+      databaseStrategy:
+        inline:
+          shardingColumn: user_id
+          algorithmExpression: ds_${user_id % 2}
+      keyGenerator:
+        type: SNOWFLAKE
+        column: order_item_id
+  bindingTables:
+    - t_order,t_order_item
+  broadcastTables:
+    - t_address
+  defaultDatabaseStrategy:
+    none:
+  defaultTableStrategy:
+    none:
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/logback.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/logback.xml
new file mode 100644
index 0000000..213d5d2
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/logback.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<configuration>
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <logger name="org.apache.shardingsphere" level="info" additivity="false">
+        <appender-ref ref="console"/>
+    </logger>
+
+    <postgres>
+        <level value="info"/>
+        <appender-ref ref="console"/>
+    </postgres>
+</configuration> 
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/server.yaml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/server.yaml
new file mode 100644
index 0000000..5b5ec2b
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-boot-mybatis-postgresql-example/src/test/resources/conf/server.yaml
@@ -0,0 +1,31 @@
+######################################################################################################
+#
+# If you want to configure orchestration, authorization and proxy properties, please refer to this file.
+#
+######################################################################################################
+
+#orchestration:
+#  name: orchestration_ds
+#  overwrite: true
+#  registry:
+#    type: zookeeper
+#    serverLists: localhost:2181
+#    namespace: orchestration
+
+authentication:
+  users:
+    root:
+      password:
+
+props:
+  max.connections.size.per.query: 1
+  acceptor.size: 16  # The default value is available processors count * 2.
+  executor.size: 16  # Infinite by default.
+  proxy.frontend.flush.threshold: 128  # The default value is 128.
+    # LOCAL: Proxy will run with LOCAL transaction.
+  # XA: Proxy will run with XA transaction.
+  # BASE: Proxy will run with B.A.S.E transaction.
+  proxy.transaction.type: LOCAL
+  proxy.opentracing.enabled: false
+  query.with.cipher.column: true
+  sql.show: false
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/pom.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/pom.xml
new file mode 100644
index 0000000..0425885
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/pom.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>proxy-sharding-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-proxy-spring-namespace-mybatis-mysql-example</artifactId>
+    <version>4.0.0-RC4-SNAPSHOT</version>
+    <name>AcceptanceTest::proxy::mysql::spring-namespace-mybatis</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-spring-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-jdbc-spring-namespace</artifactId>
+            <version>${shardingsphere.version}</version>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
new file mode 100644
index 0000000..07e9d26
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-encrypt.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
new file mode 100644
index 0000000..db9dc32
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceMasterSlaveTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-master-slave.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
new file mode 100644
index 0000000..b81d61d
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingEncryptTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-sharding-encrypt.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..16edace
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave-encrypt.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
new file mode 100644
index 0000000..889f59b
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
new file mode 100644
index 0000000..22bea65
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-sharding-databases-tables.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingDatabaseAndTableResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-encrypt.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-encrypt.xml
new file mode 100644
index 0000000..8fad128
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-encrypt.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3307/encrypt_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-master-slave.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-master-slave.xml
new file mode 100644
index 0000000..9a59223
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-master-slave.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans 
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3307/master_slave_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
new file mode 100644
index 0000000..c6ead5b
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                         
+                        
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3307/sharding_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-encrypt.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
new file mode 100644
index 0000000..2aaee1d
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                         
+                        
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3307/sharding_encrypt?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
new file mode 100644
index 0000000..b69eab1
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3307/sharding_master_slave_encrypt_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
new file mode 100644
index 0000000..ffbca0c
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+        <property name="jdbcUrl" value="jdbc:mysql://localhost:3307/sharding_master_slave_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/mysql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/logback.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/logback.xml
new file mode 100644
index 0000000..dddfd63
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-mysql-example/src/test/resources/logback.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <property name="log.context.name" value="sharding-jdbc-spring-namespace-mybatis-quickstart"/>
+    <property name="log.charset" value="UTF-8"/>
+    <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n"/>
+    <contextName>${log.context.name}</contextName>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder charset="${log.charset}">
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+    <root>
+        <level value="INFO"/>
+        <appender-ref ref="STDOUT"/>
+    </root>
+</configuration>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/pom.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/pom.xml
new file mode 100644
index 0000000..25c3498
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/pom.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>proxy-sharding-example</artifactId>
+        <groupId>org.apache.shardingsphere.example</groupId>
+        <version>4.0.0-RC4-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.shardingsphere.example</groupId>
+    <artifactId>sharding-proxy-spring-namespace-mybatis-postgresql-example</artifactId>
+    <version>4.0.0-RC4-SNAPSHOT</version>
+
+    <name>AcceptanceTest::proxy::postgresql::spring-namespace-mybatis</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere.example</groupId>
+            <artifactId>example-spring-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>sharding-jdbc-spring-namespace</artifactId>
+            <version>${shardingsphere.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <version>42.2.5</version>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/main/resources/logback.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/main/resources/logback.xml
new file mode 100644
index 0000000..9cb2593
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/main/resources/logback.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <property name="log.context.name" value="sharding-jdbc-spring-namespace-mybatis-quickstart" />
+    <property name="log.charset" value="UTF-8" />
+    <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n" />
+    <contextName>${log.context.name}</contextName>
+    
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder charset="${log.charset}">
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+    <root>
+        <level value="INFO" />
+        <appender-ref ref="STDOUT" />
+    </root>
+</configuration>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
new file mode 100644
index 0000000..07e9d26
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-encrypt.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
new file mode 100644
index 0000000..db9dc32
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceMasterSlaveTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-master-slave.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
new file mode 100644
index 0000000..b81d61d
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingEncryptTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingEncryptTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-sharding-encrypt.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
new file mode 100644
index 0000000..16edace
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveEncryptTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.apache.shardingsphere.example.core.mybatis.service.UserServiceImpl;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveEncryptTest {
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave-encrypt.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(UserServiceImpl.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceMasterSlaveEncryptResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
new file mode 100644
index 0000000..889f59b
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingMasterSlaveTest.java
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingMasterSlaveTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-sharding-master-slave.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertExampleServiceShardingMasterSlaveResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
new file mode 100644
index 0000000..c558a6e
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/java/org/apache/shardingsphere/example/SpringNamespaceShardingTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example;
+
+import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.example.core.mybatis.common.SpringResultAssertUtils;
+import org.junit.Test;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.sql.SQLException;
+
+public class SpringNamespaceShardingTest {
+    
+    private static final String CONFIG_FILE = "META-INF/application-sharding-databases-tables.xml";
+    
+    @Test
+    public void assertCommonService() throws SQLException {
+        try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_FILE)) {
+            ExampleService exampleService = applicationContext.getBean(ExampleService.class);
+            ExampleExecuteTemplate.run(exampleService);
+            SpringResultAssertUtils.assertTempPgExampleServiceShardingResult(exampleService);
+        }
+    }
+}
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-encrypt.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-encrypt.xml
new file mode 100644
index 0000000..2a9bdc8
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-encrypt.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:3307/encrypt_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-master-slave.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-master-slave.xml
new file mode 100644
index 0000000..af241c1
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-master-slave.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans 
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:3307/master_slave_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
new file mode 100644
index 0000000..c8f98dd
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-databases-tables.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                         
+                        
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:3307/sharding_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-encrypt.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
new file mode 100644
index 0000000..fbddcd1
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-encrypt.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                         
+                        
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:3307/sharding_encrypt?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
new file mode 100644
index 0000000..b2209ee
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave-encrypt.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:3307/sharding_master_slave_encrypt_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave.xml b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
new file mode 100644
index 0000000..ab40140
--- /dev/null
+++ b/sharding-proxy-example/proxy-sharding-example/sharding-proxy-spring-namespace-mybatis-postgresql-example/src/test/resources/META-INF/application-sharding-master-slave.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans.xsd 
+                        http://www.springframework.org/schema/context 
+                        http://www.springframework.org/schema/context/spring-context.xsd">
+    <context:component-scan base-package="org.apache.shardingsphere.example.core.mybatis"/>
+
+    <bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
+        <property name="driverClassName" value="org.postgresql.Driver"/>
+        <property name="jdbcUrl" value="jdbc:postgresql://localhost:3307/sharding_master_slave_db?useServerPrepStmts=true&amp;cachePrepStmts=true"/>
+        <property name="username" value="root"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSourceHikari"/>
+        <property name="mapperLocations" value="classpath*:META-INF/mappers/postgresql/*.xml"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.apache.shardingsphere.example.core.mybatis.repository"/>
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
+    </bean>
+</beans>
diff --git a/src/resources/copyright.txt b/src/resources/copyright.txt
new file mode 100644
index 0000000..2944f98
--- /dev/null
+++ b/src/resources/copyright.txt
@@ -0,0 +1,16 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
diff --git a/src/resources/manual_schema.sql b/src/resources/manual_schema.sql
new file mode 100644
index 0000000..80e5e68
--- /dev/null
+++ b/src/resources/manual_schema.sql
@@ -0,0 +1,88 @@
+DROP SCHEMA IF EXISTS demo_ds;
+DROP SCHEMA IF EXISTS demo_ds_0;
+DROP SCHEMA IF EXISTS demo_ds_1;
+
+DROP SCHEMA IF EXISTS demo_ds_master;
+DROP SCHEMA IF EXISTS demo_ds_slave_0;
+DROP SCHEMA IF EXISTS demo_ds_slave_1;
+
+DROP SCHEMA IF EXISTS demo_ds_master_0;
+DROP SCHEMA IF EXISTS demo_ds_master_0_slave_0;
+DROP SCHEMA IF EXISTS demo_ds_master_0_slave_1;
+DROP SCHEMA IF EXISTS demo_ds_master_1;
+DROP SCHEMA IF EXISTS demo_ds_master_1_slave_0;
+DROP SCHEMA IF EXISTS demo_ds_master_1_slave_1;
+
+CREATE SCHEMA IF NOT EXISTS demo_ds;
+CREATE SCHEMA IF NOT EXISTS demo_ds_0;
+CREATE SCHEMA IF NOT EXISTS demo_ds_1;
+
+CREATE SCHEMA IF NOT EXISTS demo_ds_master;
+CREATE SCHEMA IF NOT EXISTS demo_ds_slave_0;
+CREATE SCHEMA IF NOT EXISTS demo_ds_slave_1;
+
+CREATE SCHEMA IF NOT EXISTS demo_ds_master_0;
+CREATE SCHEMA IF NOT EXISTS demo_ds_master_0_slave_0;
+CREATE SCHEMA IF NOT EXISTS demo_ds_master_0_slave_1;
+CREATE SCHEMA IF NOT EXISTS demo_ds_master_1;
+CREATE SCHEMA IF NOT EXISTS demo_ds_master_1_slave_0;
+CREATE SCHEMA IF NOT EXISTS demo_ds_master_1_slave_1;
+
+-- Should sync from master-salve automatically
+ CREATE TABLE IF NOT EXISTS demo_ds_0.t_user_0 (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher VARCHAR(200), PRIMARY 
+ KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_0.t_user_1 (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher VARCHAR(200), PRIMARY 
+ KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_1.t_user_0 (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher VARCHAR(200), PRIMARY 
+ KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_1.t_user_1 (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher VARCHAR(200), PRIMARY 
+ KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_0.t_order (order_id BIGINT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_1.t_order (order_id BIGINT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_0.t_order_item (order_item_id BIGINT NOT NULL AUTO_INCREMENT, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_1.t_order_item (order_item_id BIGINT NOT NULL AUTO_INCREMENT, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_0.t_user (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher VARCHAR(200), PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_1.t_user (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher VARCHAR(200), PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_0.t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_0.t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
+
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_order_0 (order_id BIGINT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_order_1 (order_id BIGINT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_order_0 (order_id BIGINT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_order_1 (order_id BIGINT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_order_0 (order_id BIGINT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_order_1 (order_id BIGINT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_order_0 (order_id BIGINT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_order_1 (order_id BIGINT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_user (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher VARCHAR(200), PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_user (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher VARCHAR(200), PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_user (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher VARCHAR(200), PRIMARY KEY (user_id));
+ 
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_user_0 (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher 
+ VARCHAR(200), PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_user_1 (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher 
+ VARCHAR(200), PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_user_0 (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher 
+ VARCHAR(200), PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_user_1 (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher 
+ VARCHAR(200), PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_user_0 (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher VARCHAR(200), PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_user_1 (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher 
+ VARCHAR(200), PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_user_0 (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher 
+ VARCHAR(200), PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_user_1 (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher 
+ VARCHAR(200), PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_user (user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_plain VARCHAR(200),pwd_cipher VARCHAR(200), PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_order_item_0 (order_item_id BIGINT NOT NULL AUTO_INCREMENT, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_order_item_1 (order_item_id BIGINT NOT NULL AUTO_INCREMENT, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_order_item_0 (order_item_id BIGINT NOT NULL AUTO_INCREMENT, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_order_item_1 (order_item_id BIGINT NOT NULL AUTO_INCREMENT, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_order_item_0 (order_item_id BIGINT NOT NULL AUTO_INCREMENT, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_order_item_1 (order_item_id BIGINT NOT NULL AUTO_INCREMENT, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_order_item_0 (order_item_id BIGINT NOT NULL AUTO_INCREMENT, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_order_item_1 (order_item_id BIGINT NOT NULL AUTO_INCREMENT, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
\ No newline at end of file
diff --git a/src/resources/manual_schema_postgre.sql b/src/resources/manual_schema_postgre.sql
new file mode 100644
index 0000000..eb988ba
--- /dev/null
+++ b/src/resources/manual_schema_postgre.sql
@@ -0,0 +1,97 @@
+alter system set max_connections=4000;
+
+DROP SCHEMA IF EXISTS demo_ds CASCADE;
+DROP SCHEMA IF EXISTS demo_ds_0 CASCADE;
+DROP SCHEMA IF EXISTS demo_ds_1 CASCADE;
+
+DROP SCHEMA IF EXISTS demo_ds_master CASCADE;
+DROP SCHEMA IF EXISTS demo_ds_slave_0 CASCADE;
+DROP SCHEMA IF EXISTS demo_ds_slave_1 CASCADE;
+
+DROP SCHEMA IF EXISTS demo_ds_master_0 CASCADE;
+DROP SCHEMA IF EXISTS demo_ds_master_0_slave_0 CASCADE;
+DROP SCHEMA IF EXISTS demo_ds_master_0_slave_1 CASCADE;
+DROP SCHEMA IF EXISTS demo_ds_master_1 CASCADE;
+DROP SCHEMA IF EXISTS demo_ds_master_1_slave_0 CASCADE;
+DROP SCHEMA IF EXISTS demo_ds_master_1_slave_1 CASCADE;
+
+CREATE SCHEMA IF NOT EXISTS demo_ds;
+CREATE SCHEMA IF NOT EXISTS demo_ds_0;
+CREATE SCHEMA IF NOT EXISTS demo_ds_1;
+
+CREATE SCHEMA IF NOT EXISTS demo_ds_master;
+CREATE SCHEMA IF NOT EXISTS demo_ds_slave_0;
+CREATE SCHEMA IF NOT EXISTS demo_ds_slave_1;
+
+CREATE SCHEMA IF NOT EXISTS demo_ds_master_0;
+CREATE SCHEMA IF NOT EXISTS demo_ds_master_0_slave_0;
+CREATE SCHEMA IF NOT EXISTS demo_ds_master_0_slave_1;
+CREATE SCHEMA IF NOT EXISTS demo_ds_master_1;
+CREATE SCHEMA IF NOT EXISTS demo_ds_master_1_slave_0;
+CREATE SCHEMA IF NOT EXISTS demo_ds_master_1_slave_1;
+
+-- Should sync from master-salve automatically
+ CREATE TABLE IF NOT EXISTS demo_ds_0.t_user_0 (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+  PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_0.t_user_1 (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+  PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_1.t_user_0 (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+  PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_1.t_user_1 (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+  PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_0.t_order (order_id SERIAL NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_1.t_order (order_id SERIAL NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_0.t_order_item (order_item_id SERIAL NOT NULL, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_1.t_order_item (order_item_id SERIAL NOT NULL, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_0.t_user (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+                                                    PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_1.t_user (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+                                                    PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_0.t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_slave_0.t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
+
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_order_0 (order_id SERIAL NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_order_1 (order_id SERIAL NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_order_0 (order_id SERIAL NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_order_1 (order_id SERIAL NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_order_0 (order_id SERIAL NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_order_1 (order_id SERIAL NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_order_0 (order_id SERIAL NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_order_1 (order_id SERIAL NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_user (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+                                                             PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_user (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+                                                             PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_user (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+                                                             PRIMARY KEY (user_id));
+ 
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_user_0 (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+                                                               PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_user_1 (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+                                                               PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_user_0 (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+                                                               PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_user_1 (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+                                                               PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_user_0 (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+                                                               PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_user_1 (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+                                                               PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_user_0 (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+                                                               PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_user_1 (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+                                                               PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_user (user_id BIGSERIAL NOT NULL, user_name VARCHAR(200), user_name_cipher VARCHAR(200), pwd VARCHAR(200), pwd_cipher VARCHAR(200), pwd_plain VARCHAR(200),
+                                                             PRIMARY KEY (user_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_address (address_id BIGINT NOT NULL, address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_order_item_0 (order_item_id SERIAL NOT NULL, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_0.t_order_item_1 (order_item_id SERIAL NOT NULL, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_order_item_0 (order_item_id SERIAL NOT NULL, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_0_slave_1.t_order_item_1 (order_item_id SERIAL NOT NULL, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_order_item_0 (order_item_id SERIAL NOT NULL, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_0.t_order_item_1 (order_item_id SERIAL NOT NULL, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_order_item_0 (order_item_id SERIAL NOT NULL, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
+ CREATE TABLE IF NOT EXISTS demo_ds_master_1_slave_1.t_order_item_1 (order_item_id SERIAL NOT NULL, order_id BIGINT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
\ No newline at end of file
diff --git a/src/resources/sharding_checks.xml b/src/resources/sharding_checks.xml
new file mode 100644
index 0000000..6adf6b7
--- /dev/null
+++ b/src/resources/sharding_checks.xml
@@ -0,0 +1,219 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">
+<module name = "Checker">
+    <property name="charset" value="UTF-8"/>
+    <property name="severity" value="warning"/>
+    <property name="fileExtensions" value="java, properties, xml"/>
+    <module name="Header">
+        <property name="headerFile" value="copyright.txt"/>
+        <property name="fileExtensions" value="java"/>
+    </module>
+    <module name="FileTabCharacter">
+        <property name="eachLine" value="true"/>
+    </module>
+    <module name="FileLength"/>
+    <module name="NewlineAtEndOfFile">
+        <property name="lineSeparator" value="lf"/>
+    </module>
+    <module name="Translation"/>
+    <module name="UniqueProperties"/>
+    <module name="SeverityMatchFilter"/>
+    
+    <module name="TreeWalker">
+        
+        <!-- Naming Conventions -->
+        <module name="PackageName">
+            <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
+        </module>
+        <module name="TypeName"/>
+        <module name="MethodName"/>
+        <module name="InterfaceTypeParameterName"/>
+        <module name="ClassTypeParameterName"/>
+        <module name="MethodTypeParameterName"/>
+        <module name="ConstantName"/>
+        <module name="StaticVariableName"/>
+        <module name="MemberName"/>
+        <module name="LocalVariableName"/>
+        <module name="LocalFinalVariableName"/>
+        <module name="ParameterName"/>
+        <module name="CatchParameterName"/>
+        <module name="AbbreviationAsWordInName">
+            <property name="allowedAbbreviationLength" value="6"/>
+        </module>
+        
+        <!-- Size Violations -->
+        <module name="AnonInnerLength"/>
+        <module name="MethodLength"/>
+        <module name="LineLength">
+            <property name="max" value="200"/>
+        </module>
+        <module name="MethodCount"/>
+        <module name="ExecutableStatementCount">
+            <property name="max" value="50"/>
+        </module>
+        <module name="OuterTypeNumber"/>
+        <module name="ParameterNumber"/>
+
+        <!-- Whitespace -->
+        <module name="EmptyForInitializerPad"/>
+        <module name="EmptyForIteratorPad"/>
+        <module name="MethodParamPad"/>
+        <module name="ParenPad"/>
+        <module name="TypecastParenPad"/>
+        <module name="NoLineWrap"/>
+        <module name="OperatorWrap"/>
+        <module name="SeparatorWrap">
+            <property name="id" value="SeparatorWrapDot"/>
+            <property name="tokens" value="DOT"/>
+            <property name="option" value="nl"/>
+        </module>
+        <module name="SeparatorWrap">
+            <property name="id" value="SeparatorWrapComma"/>
+            <property name="tokens" value="COMMA"/>
+            <property name="option" value="EOL"/>
+        </module>
+        <module name="SeparatorWrap">
+            <property name="id" value="SeparatorWrapEllipsis"/>
+            <property name="tokens" value="ELLIPSIS"/>
+            <property name="option" value="EOL"/>
+        </module>
+        <module name="SeparatorWrap">
+            <property name="id" value="SeparatorWrapArrayDeclarator"/>
+            <property name="tokens" value="ARRAY_DECLARATOR"/>
+            <property name="option" value="EOL"/>
+        </module>
+        <module name="SeparatorWrap">
+            <property name="id" value="SeparatorWrapMethodRef"/>
+            <property name="tokens" value="METHOD_REF"/>
+            <property name="option" value="nl"/>
+        </module>
+        <module name="GenericWhitespace"/>
+        <module name="NoWhitespaceBefore"/>
+        <module name="NoWhitespaceAfter"/>
+        <module name="WhitespaceAround"/>
+        <module name="WhitespaceAfter"/>
+        <module name="SingleSpaceSeparator"/>
+        <module name="EmptyLineSeparator">
+            <property name="allowMultipleEmptyLines" value="false"/>
+            <property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
+        </module>
+        
+        <!-- Imports -->
+        <module name="AvoidStarImport"/>
+        <module name="AvoidStaticImport">
+            <property name="excludes" value="org.junit.Assert.*,org.hamcrest.CoreMatchers.*,org.mockito.Mockito.*,org.mockito.ArgumentMatchers.*"/>
+        </module>
+        <module name="IllegalImport"/>
+        <module name="RedundantImport"/>
+        <module name="UnusedImports"/>
+        <module name="CustomImportOrder"/>
+        
+        <!-- Annotations -->
+        <module name="AnnotationLocation">
+            <property name="id" value="AnnotationLocationMostCases"/>
+            <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
+        </module>
+        <module name="AnnotationLocation">
+            <property name="id" value="AnnotationLocationVariables"/>
+            <property name="tokens" value="VARIABLE_DEF"/>
+            <property name="allowSamelineMultipleAnnotations" value="true"/>
+        </module>
+        <module name="AnnotationUseStyle"/>
+        <module name="MissingOverride"/>
+        <module name="SuppressWarnings"/>
+        <module name="MissingDeprecated"/>
+        <module name="SuppressWarningsHolder"/>
+
+        <!-- Modifiers -->
+        <module name="ModifierOrder"/>
+        <module name="RedundantModifier"/>
+        
+        <!-- Coding -->
+        <module name="ArrayTrailingComma"/>
+        <module name="CovariantEquals"/>
+        <module name="DefaultComesLast"/>
+        <module name="DeclarationOrder"/>
+        <module name="EmptyStatement"/>
+        <module name="EqualsAvoidNull"/>
+        <module name="EqualsHashCode"/>
+        <module name="ExplicitInitialization"/>
+        <module name="FallThrough"/>
+        <module name="IllegalInstantiation"/>
+        <module name="IllegalCatch"/>
+        <module name="IllegalThrows"/>
+        <module name="IllegalType">
+            <property name="tokens" value="METHOD_DEF,PARAMETER_DEF,VARIABLE_DEF"/>
+        </module>
+        <module name="IllegalTokenText">
+            <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
+            <property name="format" value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
+            <property name="message" value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
+        </module>
+        <module name="MissingSwitchDefault"/>
+        <module name="ModifiedControlVariable"/>
+        <module name="MultipleVariableDeclarations"/>
+        <module name="NestedForDepth"/>
+        <module name="NestedIfDepth"/>
+        <module name="NestedTryDepth"/>
+        <module name="NoClone"/>
+        <module name="NoFinalizer"/>
+        <module name="SuperClone"/>
+        <module name="SuperFinalize"/>
+        <module name="OneStatementPerLine"/>
+        <module name="OverloadMethodsDeclarationOrder"/>
+        <module name="PackageDeclaration"/>
+        <module name="ParameterAssignment"/>
+        <module name="SimplifyBooleanExpression"/>
+        <module name="SimplifyBooleanReturn"/>
+        <module name="StringLiteralEquality"/>
+        <module name="UnnecessaryParentheses"/>
+        <module name="VariableDeclarationUsageDistance"/>
+        
+        <!-- Block Checks -->
+        <module name="EmptyBlock"/>
+        <module name="EmptyCatchBlock">
+            <property name="exceptionVariableName" value="expected|ignore"/>
+        </module>
+        <module name="AvoidNestedBlocks"/>
+        <module name="NeedBraces"/>
+        <module name="LeftCurly"/>
+        <module name="RightCurly"/>
+        
+        <!-- Class Design -->
+        <module name="DesignForExtension"/>
+        <module name="FinalClass"/>
+        <!-- cannot recognize for lombok @NoArgsConstructor(access = AccessLevel.PRIVATE), just ignore -->
+        <!--<module name="HideUtilityClassConstructor"/>-->
+        <module name="OneTopLevelClass"/>
+        <module name="InterfaceIsType"/>
+        <module name="InnerTypeLast"/>
+        <module name="VisibilityModifier"/>
+        <module name="MutableException"/>
+        <module name="ThrowsCount"/>
+        
+        <!-- Metrics -->
+        <module name="BooleanExpressionComplexity"/>
+        <module name="ClassDataAbstractionCoupling">
+            <property name="max" value="10"/>
+        </module>
+        <module name="ClassFanOutComplexity"/>
+        <module name="CyclomaticComplexity"/>
+        <module name="NPathComplexity"/>
+        <module name="JavaNCSS"/>
+        
+        <!-- Miscellaneous -->
+        <module name="ArrayTypeStyle"/>
+        <module name="UpperEll"/>
+        <module name="AvoidEscapedUnicodeCharacters"/>
+        <module name="DescendantToken"/>
+        <module name="FinalParameters"/>
+        <module name="Indentation"/>
+        <module name="OuterTypeFilename"/>
+        <module name="TodoComment"/>
+        <module name="TrailingComment"/>
+        
+        <!-- Filters -->
+        <module name="SuppressionCommentFilter"/>
+        <module name="SuppressWithNearbyCommentFilter"/>
+    </module>
+</module>