A preface.

I was fascinated by automatic code generation to reduce the amount of writing duplicate code. The Internet also searched for a long time, there are plug-ins based, there are GUI. But its configuration and learning costs are relatively high, not quite as I would like. I wanted to write one by myself with SpringBoot, but when collecting relevant information, I stumbled upon a renren-Generator project implemented by everyone’s open source, which happened to be built by SpringBoot, so I downloaded it and started playing by myself. Combined with their own project to modify the template after use, or very convenient. And I’m not going to reinvent the wheel. So next talk about use experience.

  • Field and entity types can be configured freely
  • Table prefixes can be set to be cancelled or not
  • The database supports Mysql, Sqlserver, Oracle, and Postgresql
  • Entity, XML, DAO, Service, VUE, SQL code can be generated online

2. Local deployment

I fork a renren-generator project address: gitee.com/rayson517/r…

Use git to download the source code to modify application.yml, update MySQL account and password, database name Eclipse, IDEA, run renrenApplication. Java, then start the project. http://localhost demo renderings:

3. DIY code generation template according to the actual project situation

The template path is in the Resources /template folder, and you can modify it based on the code structure of your existing project.

4. One-click GENERATION of SQL database description documents, free hands

This function is added by myself by DIY, and has not been submitted yet. You can leave a message if you want.

5. Extended DB2 support

Extend database DB2 support as our company uses it. So be ready to add a support.