MyBatis Code Generator
Generate Entity, Mapper, XML, Service, and MyBatis-Plus API files from DDL
➕
New
🕐
History
⚙️
Settings
🗑️
Clear History
📝 CREATE TABLE Statement (DDL)
🔍
Preview Generated Code
📄 Code Preview
✕
⚙️ Generator Settings
✕
Configuration Scope
Save Settings To
Project (Workspace)
Global (User)
Project settings are saved to .vscode/settings.json. Global settings apply to all projects.
Package Configuration
Base Package
Java package name for generated code
Author
Author name in generated file headers
Class Suffix Configuration
Entity Suffix
Suffix for entity classes (e.g., UserPO)
Mapper Suffix
Suffix for mapper interfaces (e.g., UserMapper)
Service Suffix
Suffix for service interfaces (e.g., UserService)
DateTime Type
Date
LocalDateTime
Instant
Java type for TIMESTAMP/DATETIME columns
Feature Options
Use Lombok
Generate @Data, @Builder annotations
Use Swagger (v2)
Generate @ApiModel, @ApiModelProperty annotations
Use Swagger (v3/OpenAPI)
Generate @Schema annotations
Use MyBatis Plus
Generate MyBatis Plus annotations
Custom Template Paths
Entity Template Path
Custom EJS template path for entity generation (e.g., /path/to/custom-entity.ejs)
Mapper Template Path
Custom EJS template path for mapper generation (e.g., /path/to/custom-mapper.ejs)
Mapper XML Template Path
Custom EJS template path for mapper XML generation (e.g., /path/to/custom-mapper-xml.ejs)
Service Template Path
Custom EJS template path for service generation (e.g., /path/to/custom-service.ejs)