# mybatis-plus-code-generator **Repository Path**: wupeixuan/mybatis-plus-code-generator ## Basic Information - **Project Name**: mybatis-plus-code-generator - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-25 - **Last Updated**: 2021-03-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MyBatis-Plus 代码生成器 ## Current Version 3.4.1 ## 概述 **功能列表:** * [x] 自动生成model类 * [x] 自动生成dao接口 * [x] 自动生成xml文件 * [x] 自动生成service接口 * [x] 自动生成service实现类 * [x] model支持Builder模式 * [x] 支持swagger2 * [x] 支持生成数据库字段常量 * [x] 支持生成Kotlin代码 * [x] ……more…… ## 支持的数据库 * [x] MySQL * [x] Oracle * [x] SqlServer ## 快速开始 你只需要三步,就能生成代码 #### 第一步:Git克隆 ``` git clone git@github.com:wupeixuan/mybatis-plus-code-generator.git ``` #### 第二步:IDE导入 #### 第三步:简单且必应的配置即可运行 `MySQL`:MySqlCodeGenerator ## 简单且必要的配置 ``` String dbUrl = "jdbc:mysql://localhost:3306/dbName"; String username = "dbUsername"; String password = "dbPassword"; String driver = "com.mysql.cj.jdbc.Driver"; // 表前缀,生成的实体类,不含前缀 String [] tablePrefixes = {}; // 表名,为空,生成所有的表 String [] tableNames = {}; // 字段前缀 String [] fieldPrefixes = {}; // 基础包名 String packageName = "com.example.module.db"; ``` ## 更多配置 见 Config ## 注意事项 1、关于指定生成的表名 ``` // 表名,为空,生成所有的表 String [] tableNames = {}; // 表名,具体表名 String [] tableNames = {"table"}; // 表名,多张表 String [] tableNames = {"table1", "table1"}; // 注意:生成多张表时,不能写成 String [] tableNames = {""}; ``` 2、包名 ``` // 基础包名 // 这是基础包名,会在后面加dao/model/service等包名 String packageName = "com.example.module.db"; ```