db_codegen_generate
Generates Spring Boot Java code (entity, DAO, service, controller, mapper) from a database table by applying customizable templates and writing files directly to the project.
Instructions
[Legacy / single-shot] Generate Java code from database table analysis using templates. Prefer the atomic workflow: codegen_build_context + codegen_render_entity/dao/service/controller/mapper (P2.2). This single-shot tool also writes files to disk in one go, with no preview/edit cycle.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection_id | Yes | Database connection ID | |
| table_name | Yes | Table name to generate code for | |
| database | No | Database name (optional, uses connection default if not specified) | |
| template_category | No | Template category to use for code generation | MybatisPlus-Mixed |
| author | No | Author name for generated code | ZXP |
| package_name | No | Java package name for generated code | com.example.generated |
| project_path | No | Target Spring Boot project path (with src/main/java) | test_project |
| include_swagger | No | Include Swagger annotations in generated code | |
| include_lombok | No | Include Lombok annotations in generated code | |
| include_mapstruct | No | Include MapStruct mappers in generated code |