# mybatis-plus代码生成使用demo
**Repository Path**: aning1024/mybatis-code-maven-plugin-demo
## Basic Information
- **Project Name**: mybatis-plus代码生成使用demo
- **Description**: mybatis-code-maven-plugin的使用demo
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2023-09-16
- **Last Updated**: 2023-09-16
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# mybatis-code-maven-plugin-demo
该项目演示如何使用[mybatis-plus-code-maven-plugin](https://gitee.com/javalaoniu/mybatis-plus-code-maven-plugin)插件生成项目
## 使用步骤
### 1. 创建项目
可以用idea创建项目的方式,也可以手动创建`mybatis-code-maven-plugin-demo`文件夹,在文件夹中新建pom.xml文件,文件所有内容如下:
```xml
4.0.0
org.example
mybatis-code-maven-plugin-demo
pom
1.0-SNAPSHOT
mybatis-code-maven-plugin-demo
```
用idea打开项目,项目结构如下,pom.xml文件外的其他文件是项目的常规文件,也可以忽略,

### 2. 配置插件
打开怕pom.xml文件,添加mybatis-plus-code-maven-plugin插件,并修改相应的配置(项目保存路径、模块名称、mysql库配置、包名等)
```xml
4.0.0
org.example
mybatis-code-maven-plugin-demo
pom
1.0-SNAPSHOT
mybatis-code-maven-plugin-demo
mybatis-code-maven-plugin-demo
io.gitee.javalaoniu
mybatis-plus-code-maven-plugin
0.0.1-SNAPSHOT
D:\Workspace\ideaIC-2023.1.win.Project\mybatis-code-maven-plugin-demo
mydemo1
false
jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&tinyInt1isBit=false
root
root123456
t_
t_sys_role,t_sys_user
com.example
entity
mapper
service
service.impl
controller
mapper
```
### 3. 生成项目
添加mybatis-plus-code-maven-plugin插件后,刷新一下工程,确保项目已经把mybatis-plus-code-maven-plugin插件引入到项目中,打开idea的maven工具栏

双击插件,我这里配置的项目生成路径就是当前项目下,所以双击命令后生成的代码如下:

### 4. 添加模块


### 5. 运行生成的项目


### 6. 访问api
