iview front and rear ends and spring boot code generation rear (side story) prior to separation architecture

Front and rear spring boot and iview end of the separation architecture development environment to enable deployment of the rear end of the docker-based (side story)

Quickly generate the code plug

We have in front of thirty chapters explain how to write a separate front and rear ends of the right structure, then it must be a good framework for a matching its corresponding automatic code generation tool, although this is the first version of the code generation tool, but this tool can reduce the number of additions and deletions to the duplication of work, then the next'll tell you how to use this plug-in.
First we need to download plug-ins on our github, this is in line with the code bg-admin use, it must be based on bg-admin of this framework, we direct access github address before and after the end of the separation architecture , then Qi clone local follows:
Here Insert Picture Description
specific implementation logic we can see the entire widget bg-admin-code-generator plug-in code.

Maven plug installation code generated to the local repository

In order to facilitate the subsequent transformation of this plugin can be directly themselves, so there is no plug-in to upload the maven PW, so you can click on the right side of maven = "bg-admin-code- generator =" clean => install the plug-in installation to complete local the maven PW.
Here Insert Picture Description
Completion of the above operations we completed the installation of our maven to achieve local maven repository, the next step we will begin to integrate our automatic code generation tool to our bg-admin-web-core in.

Quickly generate code

First, we need to design a simple table, we are here to experiment designed a called t_test, information table is as follows:
Here Insert Picture Description
Then we open our bg-admin-web-core and plugins in pom.xml inside the bottom node into our bg-admin-code-generator automatically generates the code plug, as follows:
Here Insert Picture Description
we then click the right maven = "bg-admin-web- core =" plugins = "bg-admin-code-generator =" bg-admin-code-generato: bgAdminCodeGenerator after clicking the generated code we want.
Here Insert Picture Description
After we went to our code generation bg-admin-web-core of the doc folder under our sql scripts out into the database for execution, and then we started our project, after logging project we will see the following page it means that we have completed the automation of code generated.
Here Insert Picture Description
Opening the TTest module you will see the familiar page additions and deletions, as long as we do the following additions and deletions to achieve our results we've had the automatic generation of code
Here Insert Picture Description
so here we completed the use of plug-in code, and this Code can be accessed directly at you: https://github.com/lazyboyl/bg-admin/tree/chapter-37

Published 128 original articles · won praise 72 · Views 1.13 million +

Guess you like

Origin blog.csdn.net/linzhefeng89/article/details/98937523