Logo
Spring Boot Starter

Overview #

DBPlusEngine-Driver provides the official Spring Boot Starter to make it convenient for developers to integrate DBPlusEngine-Driver and Spring Boot.

The list of compatible SpringBoot versions is as follows:

  1. SpringBoot 1.x
  2. SpringBoot 2.x
  3. SpringBoot 3.x (Experimental)

Usage #

Import Maven Dependency #

<dependency>
    <groupId>org.apache.shardingsphere</groupId>
    <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
    <version>${shardingsphere.version}</version>
</dependency>

Use DBPlusEngine Data Source in Spring #

Developers can use DataSource to inject to use native JDBC or ORM frameworks such as JPA, Hibernate or MyBatis.

Take native JDBC usage as an example:

@Resource
private DataSource dataSource;