Skip to content

Getting Started

Example for MySQL

Usage

Maven central: kite-spring-boot-starter

  1. Add the following dependencies to your project:
  • Maven
xml
<dependency>
   <groupId>io.github.tangllty</groupId>
   <artifactId>kite-spring-boot-starter</artifactId>
   <version>${kite.version}</version>
</dependency>
  • Gradle
kts
implementation("io.github.tangllty:kite-spring-boot-starter:${kite.version}")
  1. Create a table in your database
sql
create table account (
  id          bigint not null auto_increment,
  username    varchar(32)     default '',
  password    varchar(32)     default '',
  balance     decimal(10,2)   default '0.00',
  create_time date            default null,
  update_time date            default null,
  primary key (`id`)
);
  1. Configure your database connection information in the application.yml file
yaml
spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://127.0.0.1:3306/kite-test
    username: root
    password: password
  1. Extend the BaseMapper interface to create a Mapper interface
java
import com.tang.kite.mapper.BaseMapper;

public interface AccountMapper extends BaseMapper<Account> {
}

Built with ❤️ by Tang