All Projects → handosme → mybatis-generator-plus

handosme / mybatis-generator-plus

Licence: Apache-2.0 License
轻度扩展mybatis-generator-core插件,与官方插件兼容。

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to mybatis-generator-plus

mall
SpringBoot + Layui 电子商城系统
Stars: ✭ 38 (-38.71%)
Mutual labels:  mybatis, mybatis-generator
atguigu ssm crud
Atguigu-SSM-CRUD 一个最基本的CRUD系统,采用IDEA+Maven搭建,具备前后端交互功能,前端采用BootStrap+Ajax异步请求DOM渲染,后端采用SpringMVC+MyBatis+Mysql8.0+Servlet+Jsp,符合REST风格URL规范,并加入了Hibernate提供的数据校验功能,支持PageHelper的分页功能,很适合SSM阶段性练习。同时用到了很多前端操作以及BootStrap组件,也有利于学习JS和前端框架。
Stars: ✭ 52 (-16.13%)
Mutual labels:  mybatis, mybatis-generator
IDEAPractice
Java练习 - Java基础知识,面试题,小demo,长期积累 | intellij idea + maven + tomcat
Stars: ✭ 45 (-27.42%)
Mutual labels:  mybatis, mybatis-generator
Roncoo Mybatis Generator
龙果开源-Mybatis代码自动生成工具
Stars: ✭ 165 (+166.13%)
Mutual labels:  mybatis, mybatis-generator
autumn
采用Spring、Spring Boot、Redis、MyBatis、Shiro、Druid框架开发,搭载mysql数据。 如果你厌烦了MyBatis中需要手动创建表的事情,这个项目非常适合你,自动为你生成表。 从此你不在需要导入sql文件了,项目初始化变得异常简单,结构清晰,易于开发,真正拿来可用。 全注解MyBatis开发,没有任何mapper文件,一切sql 映射都用代码实现,全程无xml配置,对xml编写mapper有恐惧症的人的福音。 提供双向生成功能: 实体类自动生成数据库表,全过程不需要任何SQL语句,所有表自动生成 通过表生成基础结构代码,生成代码中已包含CRUD功能,表级别的API接口全部都有 基本实例数据全自动通过代码初始化,无需干预 仅仅只需要修改数据库连接地址,…
Stars: ✭ 28 (-54.84%)
Mutual labels:  generator, mybatis
Spring Cloud Shop
spring cloud 版分布式电商项目,全力打造顶级多模块,高可用,高扩展电商项目
Stars: ✭ 248 (+300%)
Mutual labels:  mybatis, mybatis-generator
mybatis-generator-gui-plus
基于MyBatis-Generator+SQLite+beautyeye_lnf开发的一款图形化代码生成器
Stars: ✭ 16 (-74.19%)
Mutual labels:  mybatis, mybatis-generator
Community
开源论坛、问答系统,现有功能提问、回复、通知、最新、最热、消除零回复功能。功能持续更新中…… 技术栈 Spring、Spring Boot、MyBatis、MySQL/H2、Bootstrap
Stars: ✭ 1,947 (+3040.32%)
Mutual labels:  mybatis, mybatis-generator
mybatis-generator
MyBatis code generator
Stars: ✭ 25 (-59.68%)
Mutual labels:  mybatis, mybatis-generator
gd-generator
A code generator that elegantly generates mybatis ORM (mapper and xml config) and intelligently retains user-defined mapper and xml, automatically creates/synchronizes database tables, and records and prints exactly after each domain model change Database repair sql, support for the production of a variety of complex VO (View Object) objects, al…
Stars: ✭ 82 (+32.26%)
Mutual labels:  mybatis, mybatis-generator
Priest
dubbo mybatis springboot base soa rest api framework with customer code generator
Stars: ✭ 160 (+158.06%)
Mutual labels:  mybatis, mybatis-generator
demo springboot with mybatis
No description or website provided.
Stars: ✭ 17 (-72.58%)
Mutual labels:  mybatis, mybatis-generator
Spring Boot Vue Bank
我,请始皇[打钱]是一个前后端分离的工具人系统,项目采用 SpringBoot+Go+Vue 开发,项目加入常见的企业级应用所涉及到的技术点,例如 Redis、RabbitMQ 等(主要是多用用工具多踩踩坑)。
Stars: ✭ 157 (+153.23%)
Mutual labels:  mybatis, mybatis-generator
Spring Boot Plus
🔥 Spring-Boot-Plus is a easy-to-use, high-speed, high-efficient,feature-rich, open source spring boot scaffolding. 🚀
Stars: ✭ 2,198 (+3445.16%)
Mutual labels:  generator, mybatis
Mybatis Plus Example
SpringBoot整合MyBatis-Plus,源码学习,增删改查,Lamdba支持
Stars: ✭ 128 (+106.45%)
Mutual labels:  mybatis, mybatis-generator
lightbatis
Lightbatis 增强 MyBatis 版Java 数据库持久层,更简洁并易用
Stars: ✭ 52 (-16.13%)
Mutual labels:  mybatis, mybatis-generator
Eshop Soa
EShop基于Dubbo实现SOA服务化拆分,并基于RocketMQ解决了分布式事务(新版SpringBootSOASkeleton)
Stars: ✭ 65 (+4.84%)
Mutual labels:  mybatis, mybatis-generator
Mybatiscodehelper Pro
brucege.com
Stars: ✭ 1,565 (+2424.19%)
Mutual labels:  mybatis, mybatis-generator
AllInOneFX
All In One JavaFX Application with a curated list of awesome JavaFX libraries, frameworks
Stars: ✭ 26 (-58.06%)
Mutual labels:  mybatis, mybatis-generator
kite-mybatis-builder
web 形式的mybatis 生成器
Stars: ✭ 58 (-6.45%)
Mutual labels:  mybatis, mybatis-generator

MyBatis Generator Plus

License Build Status Maven Central

1.介绍:

MyBatis generator plus 基于mybatis-generator-core v.1.3.2 扩展,增加了以下特性:

  1. 生成支持Oracle、Mysql、Sqlserver分页查询的代码:
//分页查询demo
OperateLogExample relationshipsExample = new OperateLogExample();
relationshipsExample.setPagination(0L,10L);
List<OperateLog> operateLogList = operateLogMapper.selectByExample(relationshipsExample);
  1. 生成支持Oracle、Mysql、Sqlserver批量插入的代码:
//批量插入demo
List<OperateLog> operateLogList = new ArrayList<>();
for (int i = 0; i < 5; i++) {
    OperateLog operateLog = new OperateLog.Builder()
        .action("insertBatch_test"+i)
        .build();
    operateLogList.add(operateLog);
}
operateLogMapper.insertBatch(operateLogList);
  1. Model类支持Builder模式创建,示例代码:
User user = new User.Builder()
    .userName("insert_test")
    .creatTime(new Date())
    .updateTime(new Date())
    .build();
  1. 支持Oracle使用SEQUENCE实现自增主键:
    需要建立表主键对应的SEQUENCE,并且SEQUENCE的名称作出了要求:格式为table_name_SEQUENCE

  2. 支持Mapper接口设置数据源schema,可用于分库业务;
    demo.mapper.ooc.UserVisitLogMapper.DATA_SOURCE_NAME

  3. 针对MySQL下分页大偏移量时慢查询优化List<Domain> selectByBigOffset(DomainExample example);

  4. 乐观锁支持int updateByOptimisticLock(Domain record);

2.使用方式

方式一: 配置maven插件生成代码【推荐】

pom里plugin配置如下:

<plugin>
  <groupId>org.ihansen.mbp</groupId>
  <artifactId>mybatis-generator-plus-maven-plugin</artifactId>
  <version>1.4</version>
  <configuration>
    <verbose>true</verbose>
    <overwrite>true</overwrite>
    <configurationFile>tool/mbp/MybatisGeneratorCfg.xml</configurationFile>
  </configuration>
</plugin>

供参考的MBP配置文件: MybatisGeneratorCfg.xml
终端运行如下命令,生成自动代码:

mvn org.ihansen.mbp:mybatis-generator-plus-maven-plugin:1.4:generate

方式二:运行可执行jar文件

包含运行依赖包的可独立执行jar文件:mybatis-generator-plus-jar-with-dependencies.jar
供参考的MBP配置文件: MybatisGeneratorCfg.xml
使用如下命令执行即可生成自动文件:

java -jar mybatis-generator-plus-jar-with-dependencies-1.4.jar -configfile MybatisGeneratorCfg.xml -overwrite

方式三:main方法运行

本工具的使用方式和原生的MyBatis generator使用方式一致,兼容原生版本。maven 坐标:

<dependency>
  <groupId>org.ihansen.mbp</groupId>
  <artifactId>mybatis-generator-plus</artifactId>
  <version>1.4</version>
  <scope>test</scope>
</dependency>

生成文件的示例入口: test/demo.MBPMain

3.MBP的用户:

ihansen.org 掌上110

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].