Git Product home page Git Product logo

mybatis-plus-generator's Introduction

mybatis-plus代码生成器

项目中使用mybatis-plus代码生成器(新),可以根据数据表的结构,生成entity、mapper、service、controller等代码,提高开发效率。

这里整理了一些常用的配置,并自定义模板文件,具体的配置可以参考官方文档。

完整配置参考

https://baomidou.com/pages/981406/

使用步骤

  1. 代码根据数据表生成,所以需要先创建数据库和表
  2. 修改单元测试类中的数据库连接配置
FastAutoGenerator.create("jdbc:mysql://localhost:3306/your_database?useUnicode=true?characterEncoding=UTF-8&serverTimeZone=Asia/Shanghai",
                                 "your_user",
                                 "your_password")
                                 ...
  1. 运行单元测试类
       mvn clean test
  2. 在项目目录下生成各层代码

注意

  • 项目使用的JDK为17、SpringBoot3,各依赖均已适配SpringBoot3
  • 其他较新版本未经过测试,如有问题请自行解决

自定义

  • 可以根据自己的需要修改模板文件,模板文件在resources/templates下

mybatis-plus-generator's People

Contributors

qiu121 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.