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

A Spring Cloud-based code generation method

A code generation and code file technology, applied in the field of microservices, can solve problems such as more time-consuming, increased code files and code volume, and increased development complexity, so as to quickly respond to changes in requirements, reduce error rates, and speed up development efficiency Effect

Inactive Publication Date: 2019-05-03
G CLOUD TECH
View PDF4 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

"Single responsibility" is one of the basic principles of microservices, which requires the microservice framework to be divided into modules, and each microservice only completes the functions of its own modules; this will increase the complexity of development, increase the number of code files and codes, Developers need to spend more time writing code

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
  • A Spring Cloud-based code generation method
  • A Spring Cloud-based code generation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0034] See figure 1 Shown, is the flow chart of the code generation method based on Spring Cloud of the present invention; The basic process of adopting this method is as follows:

[0035] S10: Create a code generation template for the remote call interface of Spring Cloud.

[0036] The remote call interface is used to define the remote call method name, parameters, return value and request type.

[0037] The specific content of the remote call interface code generation template is: according to the database table generated as required, the detailed attributes and table structure information of the database table are obtained for code generation. Set the interface package name and the class to be imported according to the obtained database table information, specify the name of the microservice to be called and set the fuse class through annotations on the interface, and then generate common interface methods, including adding, adding in batches, modifying, and modifying in b...

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 technical field of microservices, in particular to a Spring Cloud-based code generation method. The method comprises the following steps: firstly, creating a Spring Cloudremote calling interface code generation template, a remote calling implementation class code generation template, fusing class code generation template, and then realizing a Spring Cloudd-based codegeneration method; and finally, setting a code generation parameter to generate a code file, and adding the code file into the project. Code compiling in micro-service development can be reduced, thedevelopment efficiency is improved, and quick response and demand change are achieved according to needs; and the method can be used for micro-service development.

Description

technical field [0001] The invention relates to the technical field of microservices, in particular to a code generation method based on Spring Cloud. Background technique [0002] The microservice framework is a method of developing a single application as a set of small services. It splits a large single application and service into several or even dozens of supporting microservices, and each service is developed for an independent business. , a microservice generally completes a specific function. Microservices have the advantages of loose coupling, high fault tolerance, and on-demand expansion. [0003] The current microservice framework has various advantages, but there are also shortcomings. "Single responsibility" is one of the basic principles of microservices, which requires the microservice framework to be divided into modules, and each microservice only completes the functions of its own modules; this will increase the complexity of development, increase the num...

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/33G06F8/20
Inventor 张伟荣季统凯
Owner G CLOUD TECH
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