1 Star 0 Fork 0

zhangjianshe / db-maven-plugin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

how to compile it

mvn clean package deploy -Pziroom

#how to use it

pom.xml文件中加入 profile

 <profile>
    <id>code</id>
    <plugin>
        <groupId>cn.mapway</groupId>
        <artifactId>db-maven-plugin</artifactId>
        <version>1.0.0</version>
        <executions>
            <execution>
                <phase>generate-sources</phase>
                <goals>
                    <goal>mybatis</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <jdbcUrl>
                jdbc:mysql://ip_or_domain_name:3306/database_name?useUnicode=true&amp;characterEncoding=utf8&amp;useSSL=false
            </jdbcUrl>
            <driver>com.mysql.jdbc.Driver</driver>
            <user>user_name</user>
            <pwd>password</pwd>
            <schema>hddp_common</schema>
            <author>ZhangJianshe</author>
            <lombok>true</lombok>
            <dateFormat>yyyy-MM-dd HH:mm:ss</dateFormat>
            <entityPackage>com.ziroom.hddp.common.dao.entity</entityPackage>
            <daoPackage>com.ziroom.hddp.common.dao.entity</daoPackage>
            <includes>table_name1;table_name2</includes>
            <excludes>table_name1;table_name2</excludes>

        </configuration>
    </plugin>
</profile>

然后执行 mvn clean package -Pcode 就可以生成相应的数据库访问代码,这个代码是基于MyBatisPlus,请引入相应的包

rules

如果字段类型为 JSON 可以在 数据库字段注释中添加如下注释

  • list:cn.XXX.ObjectName 字段为list类型 List
  • type:cn.XXX.ObjectName 字段为 ObjectName

空文件

简介

maven plugin for db operation 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/satway/db-maven-plugin.git
git@gitee.com:satway/db-maven-plugin.git
satway
db-maven-plugin
db-maven-plugin
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891