本工具基于MyBatis-Plus的代码生成器, MyBatis-Plus官网:https://baomidou.com/ ,请尊重原作者作品。
demo: https://gitee.com/javalaoniu/mybatis-code-maven-plugin-demo
插件: https://gitee.com/javalaoniu/mybatis-plus-code-maven-plugin
使用本工具生成的项目特点:
主要技术框架springboot2.5.4+mybatis-plus3.5.3.2+hikari+swagger2 2.9.2,实现数据库单表增删改查功能,并实现批量插入更新删除功能,项目的功能和配置都是实践出的最佳配置,生成的代码即可直接运行使用。
其他特点:
git clone git@gitee.com:javalaoniu/mybatis-plus-code-maven-plugin.git
mvn clean install
把该项目(执行命令后会安装为maven插件)部署到本地maven库,后面就可以在其他项目中引用该插件,引用该插件,打开你的项目的pom.xml文件,添加如下内容,然后修改相应的配置参数
<plugin>
<groupId>io.gitee.javalaoniugroupId>
<artifactId>mybatis-plus-code-maven-pluginartifactId>
<version>0.0.1-SNAPSHOTversion>
<configuration>
<savePath>D:\Workspace\ideaIC-2023.1.win.Project\mympdemosavePath>
<groupPackage>com.examplegroupPackage>
<moduleName>demotestmoduleName>
<fileOverride>truefileOverride>
<dbSetting>
<url>jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&tinyInt1isBit=falseurl>
<username>rootusername>
<pwd>root123456pwd>
<tablePrefix>t_tablePrefix>
<tables>t_sys_role,t_sys_usertables>
dbSetting>
<packageSetting>
<entity>entityentity>
<mapper>mappermapper>
<service>serviceservice>
<serviceImpl>service.implserviceImpl>
<controller>controllercontroller>
<xml>mapperxml>
packageSetting>
configuration>
plugin>

或者使用命令方式,打开命令控制台并进入到pom文件所在文件夹,再执行插件命令:
mvn mybatis-plus-code:generate



插件地址: mybatis-plus-code-maven-plugin
使用DEMO:mybatis-code-maven-plugin-demo
demo: https://gitee.com/javalaoniu/mybatis-code-maven-plugin-demo
插件: https://gitee.com/javalaoniu/mybatis-plus-code-maven-plugin