Public component configuration method and device, equipment and storage medium

A configuration method and component technology, applied in software maintenance/management, version control, program code adaptation, etc., can solve problems such as inability to directly load and parse XML files, multiple development and testing costs, etc., to improve efficiency and reduce development costs Effect

Pending Publication Date: 2020-06-26
卓望数码技术(深圳)有限公司
View PDF14 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] During the research and development process, it is necessary to transform the microservice architecture of the old project, such as migrating the project from Springmvc to the SpringCloud framework. The old project contains many JAVA components that depend on XML configuration files, such as redis, ftp, resend, simpletimer, etc., and configure them It is necessary to clearly specify the loading path (absolute path) of the XML. After the migration, the Spring Cloud configuration center cannot directly load and parse the XML files for these components. It is necessary to uniformly transform the XML configuration files used by the components in the old project into YAML files. , but after replacing the configuration file with a YAML file, the common components must be modified at the code level. It is time-consuming to determine the configuration items and structural complexity of the configuration file. Once the project references a large number of components, the code needs to be changed. If there are too many, the migration will take longer. When some public components are not only used in one project, upgrading the components may affect the operation of other projects. On the whole, configuration changes have a relatively large impact on public components. It requires More development and testing costs

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
  • Public component configuration method and device, equipment and storage medium
  • Public component configuration method and device, equipment and storage medium
  • Public component configuration method and device, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0038] figure 1 It is a schematic diagram of component initialization API in the prior art. It can be seen in the figure that whether it is redis, ftp, resend or simpletimer, the common feature is that the parameters of the API need to clearly specify the loading path of the XML file, that is, the absolute path.

[0039] figure 2 It is a schematic diagram of the configuration process of the public components in the prior art, including the following steps: (1) writing the YAML configuration file according to the node hierarchy of the XML configuration file; (2) reading the XML configuration file before the migration of the public components, and reading the YAML after the migration configuration file.

[0040] After the migration, the Spring Cloud configuration center cannot directly load and parse the XML files for these components, so the XML configuration files used by the components in the old project must be uniformly transformed into YAML files, but after replacing the...

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 discloses a public component configuration method. The method is suitable for configuration of public components after a research and development project migrates from Springmvc to a Spring Cloud framework. The method comprises the following steps of: filling XML (Extensive Makeup Language) configuration content required to be loaded by a component into a YAML (YavaScript Architecture Markup Language) file; then, entering a JAVA adapter mode; acquiring names of components, and completing configuration of the component according to the YAML file. According to the method, XML configuration of the component is stored in a Key-Value key value pair mode; java adapter modes are utlized, during service registration, the XML configuration file is generated by using the adapter, the compressed component configuration content in the YAML configuration file is converted into the parameter content required by the public component initialization API, the original component does not need to be subjected to secondary transformation, and the component configuration is directly carried out to achieve seamless joint, so that the development cost is reduced, and the migration transformation efficiency is improved.

Description

technical field [0001] The invention relates to the field of software development, in particular to a public component configuration method, device, equipment and storage medium. Background technique [0002] During the research and development process, it is necessary to transform the microservice architecture of the old project, such as migrating the project from Springmvc to the SpringCloud framework. The old project contains many JAVA components that depend on XML configuration files, such as redis, ftp, resend, simpletimer, etc., and configure them It is necessary to clearly specify the loading path (absolute path) of the XML. After the migration, the Spring Cloud configuration center cannot directly load and parse the XML files for these components. It is necessary to uniformly transform the XML configuration files used by the components in the old project into YAML files. , but after replacing the configuration file with a YAML file, the common components must be modi...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/71G06F8/76
CPCG06F8/71G06F8/76
Inventor 陈炯其
Owner 卓望数码技术(深圳)有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products