AI Agent Hub
Back to skills
Spring Boot MyBatis-Plus Persistence Enhancement icon

Spring Boot MyBatis-Plus Persistence Enhancement

Development Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow the guide at https://skillhub.cn/install/skillhub.md to install @user_faca7523/springboot-mybatis.

About this skill

Problem

When adding database persistence to an existing Spring Boot project, teams often miss mybatis-plus-jsqlparser, pagination interceptors, or auto-filled audit fields, and datasource, camel-case mapping, and logical deletion settings can drift into ad hoc code.

How It Works

This skill assumes a base project generated by springboot-init and enhances the persistence layer using artifactId and packageName:
- Updates pom.xml: adds com.mysql:mysql-connector-j, com.baomidou:mybatis-plus-spring-boot3-starter, and, for MyBatis-Plus 3.5.9+, com.baomidou:mybatis-plus-jsqlparser.
- Updates application.yml: configures datasource, camel-case mapping, SQL logging, and logical deletion.
- Generates MybatisPlusConfig: registers MybatisPlusInterceptor and PaginationInnerInterceptor.
- Generates MyMetaObjectHandler: insertFill and updateFill populate createTime, createUser, updateTime, and updateUser.

Boundaries

It does not design business code or bootstrap a Spring Boot application. Auto-fill depends on UserContext and the expected field names. If required parameters or the project path are missing, provide artifactId, packageName, and base project context first.

Use Cases

  • Add MySQL and MyBatis-Plus to an existing Spring Boot project with pagination and auto-fill.
  • Update pom.xml and application.yml to avoid missing MyBatis-Plus jsqlparser pagination dependencies.
  • Generate consistent createTime, createUser, updateTime, and updateUser auto-fill logic for entities.
  • Configure pagination interceptor, camel-case mapping, and logical deletion in MyBatis-Plus 3.5.9+ projects.

Best For

  • Java backend engineers adding database access to a Spring Boot service
  • Business developers standardizing persistence config and audit field filling
  • Tech leads taking over a repo and completing MyBatis-Plus setup
  • Architects reducing hand-written pagination and auto-fill boilerplate