# db-maven-plugin
**Repository Path**: satway/db-maven-plugin
## Basic Information
- **Project Name**: db-maven-plugin
- **Description**: maven plugin for db operation
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: https://www.github.com
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-05-19
- **Last Updated**: 2024-03-28
## Categories & Tags
**Categories**: Uncategorized
**Tags**: java-util, Javafx, Java
## README
# how to compile it
mvn clean package deploy -Pziroom
#how to use it
pom.xml文件中加入 profile
```xml
code
cn.mapway
db-maven-plugin
1.0.0
generate-sources
mybatis
jdbc:mysql://ip_or_domain_name:3306/database_name?useUnicode=true&characterEncoding=utf8&useSSL=false
com.mysql.jdbc.Driver
user_name
password
hddp_common
ZhangJianshe
true
yyyy-MM-dd HH:mm:ss
com.ziroom.hddp.common.dao.entity
com.ziroom.hddp.common.dao.entity
table_name1;table_name2
table_name1;table_name2
```
然后执行 ```mvn clean package -Pcode``` 就可以生成相应的数据库访问代码,这个代码是基于MyBatisPlus,请引入相应的包
## rules
如果字段类型为 JSON 可以在 数据库字段注释中添加如下注释
- list:cn.XXX.ObjectName 字段为list类型 List
- type:cn.XXX.ObjectName 字段为 ObjectName