Overview
ShardingSphere-JDBC provides official Spring Boot Starter to make convenient for developers to integrate ShardingSphere-JDBC and Spring Boot.
Usage
Import Maven Dependency
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>${shardingsphere.version}</version>
</dependency>
Use ShardingSphere Data Source in Spring
Developer can inject to use native JDBC or ORM frameworks such as JPA, Hibernate or MyBatis through the DataSource.
Take native JDBC usage as an example:
@Resource
private DataSource dataSource;
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .