Springboot code generator

Time:2021-1-20

brief introduction

A code generator based on native MySQL & springboot & mybatis, which can completely liberate both hands after creating tables

  • Regular customized development
  • Solve both hands, one key to complete the inherent code
  • Original mybatis.xml Documents, all the details
  • It supports interception interface and allows developers to inherit the interface to implement custom file content
  • Add an automatic generation table structure description document

to update

  • On February 11, 2020, the automatic generation table structure description document (based on the automatic interception interface implementation) will be added

instructions

This project is a common java project, which needs a local Java environment and a connective MySQL database

After pulling the code, configure the following(resources/application.properties)That’s it
Springboot code generator

Main method @ see App.java

public class App {
    /***
     *Execute build project
     */
    public static void main(String[] args){
        AbstractEngine engine = AbstractEngine.init();
        engine.execute();
    }
}

The result is a maven project, which can be opened directly with IDE

Effect demonstration

The database is shown in the figure below

Springboot code generator

Code generation and compilation diagram:

Springboot code generator

Technical details

The main core of this project is to build a regular and common code content through two built-in table field queries in MySQL and freemaker template

  • FreeMaker DefaultEngine.java Process method
  • Mybatis Native XML, including add, batch add, delete, batch delete, multi condition paging query, list query, single query, single data modification, etc
  • Logback log
  • SpringBoot
  • Plug in interceptor (based on org.reflections Implementation) – supports inheriting the specified interface and realizing the desired function without changing other code

agreement

GNU General Public License v3.0

last

This project is built from scratch. It is suitable for beginners and beginners to learn. It is more suitable for big guys to build simple demo directly and quickly, and spend time on more valuable things. Welcome to star & fork

Click me: GitHub address

Springboot code generator