Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Automatic code generation method, device and equipment and storage medium

A code generation and automatic code technology, applied in the direction of creating/generating source code, software engineering design, instrumentation, etc., can solve problems such as time-consuming and labor-intensive, lack of POJO, table structure field annotations, and labor-intensive problems

Pending Publication Date: 2020-11-27
CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF0 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, in the existing development process, in order to realize the serialization of pojo objects, it is necessary to manually add a serialization interface to the pojo object. This process is time-consuming and labor-intensive. Moreover, the pojo generated using mybatis-generator lacks correspondence with the table structure fields The comments make it difficult for developers to confirm the meaning corresponding to the name of each field in pojo. At this time, developers can only manually add fields by themselves, or go to the database to find the corresponding field meanings when using it, no matter which one , is a labor-intensive thing, resulting in inefficient code development

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Automatic code generation method, device and equipment and storage medium
  • Automatic code generation method, device and equipment and storage medium
  • Automatic code generation method, device and equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0071] The embodiment of the present invention provides an automatic code generation method, device, equipment and storage medium, which improves the code development efficiency based on the mybatis framework.

[0072] The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and not necessarily Used to describe a specific sequence or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the term "comprising" or "having" and any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to those explicitly listed instead, may include...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the field of development assistance, discloses an automatic code generation method, device and equipment and a storage medium, and the method, the device and the equipment areused for improving the code development efficiency based on a mybatis framework. The method comprises the steps of creating an automatic code generation project based on a data persistence frameworkmybatis, and importing a jar package of a preset version into the automatic code generation project; under a resource directory of the automatic code generation project, creating a configuration fileof the jar package; under a code generator configuration node of the configuration file, adding a preset plug-in introduction code so as to introduce a preset serialized plug-in and a database accessinterface plug-in into an automatic code generation project; receiving an automatic code generation instruction, and generating a simple java object pojo according to the automatic code generation instruction; adding database table field annotations to the pojo through a database access interface plug-in; and performing serialization processing on the pojo added with the table structure annotationthrough a serialization plug-in to obtain a serialized file.

Description

technical field [0001] The invention relates to the field of development assistance technology, in particular to an automatic code generation method, device, equipment and storage medium. Background technique [0002] mybatis is a data persistence framework based on the Java programming language, which supports customized structured query language (structured query language, SQL), stored procedures, and advanced mapping. In the traditional development of mybatis, when we establish the data transfer object (data transfer object, DTO) corresponding to the database table structure, if we adopt the pure manual development mode, when the table structure is simple, the corresponding manual input operation is also very simple , and when the table structure is complex, it is not only cumbersome to check the fields one by one, but also error-prone. [0003] mybatis-generator is an automatic code generation tool for mybatis, which can automatically generate the code required for myba...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/30G06F8/71G06F8/73
CPCG06F8/315G06F8/71G06F8/73
Inventor 韩岚
Owner CHINA PING AN PROPERTY INSURANCE CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products