Setup and configuration
To get started, we will go through a two-step procedure. The first part will help you ensure that you have correctly prepared all the requirements, while the second part will give you an overview of the configuration method.
Introducing the preliminary requirements
At the very beginning, if you are looking to use ShardingSphere-JDBC, first add a ShardingSphere-JDBC dependency. Take the following Maven dependency as an example:
<dependencies>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core</artifactId>
<version>5.0.0</version>
</dependency>
</dependencies>
Then, create a ShardingSphere-JDBC configuration file. If you choose a Java configuration, skip this step. Take the config-sharding.yaml
YAML configuration as an example. First, we need to define mode
and dataSources
...