A method and device for implementing annotation configuration

Through the combination of annotated configuration and Spring framework, the problem of errors in conversion from string to program type and high intrusion of remote configuration information logic for business is solved, and low-invasion configuration information synchronization and automatic type conversion are achieved.

CN110795135BActive Publication Date: 2025-02-21BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201810863084.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-08-01
Publication Date
2025-02-21
Estimated Expiration
2038-08-01

AI Technical Summary

Technical Problem

In the prior art, the conversion processing process from string to program type is scattered across the application, resulting in high intrusion in business logic and improper remote synchronization may affect normal business logic execution.

Method used

Through annotated configuration combined with Spring framework features, a configuration information synchronization client with low intrusion to business is achieved. The method includes reading configuration files, creating component factory classes, executing container postprocessors to synchronize configuration information, and performing type conversion of string configuration information through the PropertyEditor of Spring framework.

Benefits of technology

Automatic conversion of configuration information and types is realized, and the processing logic of configuration information is unified, making the application transparent and low intrusion of configuration information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110795135B_ABST
    Figure CN110795135B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for implementing annotation-based configuration, and relates to the field of computer technology. A specific implementation of the method includes: reading a configuration file to implement environment settings; creating a component factory class and adding component definitions; executing a container postprocessor and then synchronizing configuration information; and creating a component object. This implementation can solve the problem of errors in converting from string to program type and the high intrusiveness of the logic for obtaining remote configuration information to the business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for implementing annotation-based configuration. Background Art

[0002] At present, most application systems require some configuration information. For example, the setting of business logic thresholds (the number of orders allowed to be placed by a single user in a day) and the setting of some switches (whether to use risk control logic). This type of information is usually stored in Zookeeper (a distributed, open source distributed application coordination service) or a self-implemented configuration service center, using passive notification or active polling to obtain remote values ​​(all in the form of strings), and then converted to the data type required by the program (Integer, Boolean, Date, etc.) and then cached locally (for example: in a static variable in the JVM).

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0004] The process of converting from "string" to "program type" and caching it locally is scattered in various places where the application needs configuration information. It is somewhat invasive to the business logic of the application, and if it is not synchronized with the remote properly, it will also affect the normal business logic execution. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a method and apparatus for implementing annotation-based configuration, which can solve the problem of errors in converting from string to program type and the high intrusiveness of the logic for obtaining remote configuration information to the business.

[0006] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, a method for implementing annotation-based configuration is provided, including reading a configuration file to implement environment settings; creating a component factory class and adding component definitions; executing a container postprocessor and then synchronizing configuration information; and creating a component object.

[0007] Optionally, execute the container post-processor and then synchronize the configuration information, including:

[0008] Parse @ConfigPath and @ConfigKey to obtain the Key value and Value value corresponding to @ConfigPath and @ConfigKey respectively;

[0009] Connect to the remote configuration center to determine whether the Key value and Value value corresponding to @ConfigPath and @ConfigKey exist;

[0010] If it exists, get the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey in the remote configuration center to update them locally;

[0011] If it does not exist, add the parsed @ConfigPath Key value, Value value, and @ConfigKey Key value and Value value to the remote configuration center.

[0012] Optionally, annotate the resolved @ConfigPath Key and Value, and the resolved @ConfigKey Key and Value.

[0013] Optionally, get the Key value and Value value of @ConfigPath of the remote configuration center, and the Key value and Value value of @ConfigKey, including:

[0014] The string form of the configuration information is converted into the value of the data type corresponding to the Key through the PropertyEditor of the Spring framework; the configuration information is the Key value and Value value of @ConfigPath of the remote configuration center, and the Key value and Value value of @ConfigKey.

[0015] In addition, according to one aspect of an embodiment of the present invention, a device for implementing annotation-based configuration is provided, including a setting module for reading a configuration file to implement environment settings; creating a component factory class and loading component definitions; a configuration module for executing a container postprocessor and then synchronizing configuration information to create a component object.

[0016] Optionally, the configuration module executes a container postprocessor and then synchronizes configuration information, including:

[0017] Parse @ConfigPath and @ConfigKey to obtain the Key value and Value value corresponding to @ConfigPath and @ConfigKey respectively;

[0018] Connect to the remote configuration center to determine whether the Key value and Value value corresponding to @ConfigPath and @ConfigKey exist;

[0019] If it exists, get the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey in the remote configuration center to update them locally;

[0020] If it does not exist, add the parsed @ConfigPath Key value, Value value, and @ConfigKey Key value and Value value to the remote configuration center.

[0021] Optionally, the configuration module is further used to:

[0022] Add annotations to the parsed @ConfigPath Key value, Value value, and the parsed @ConfigKey Key value and Value value.

[0023] Optionally, the configuration module obtains the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey of the remote configuration center, including:

[0024] The string form of the configuration information is converted into the value of the data type corresponding to the Key through the PropertyEditor of the Spring framework; the configuration information is the Key value and Value value of @ConfigPath of the remote configuration center, and the Key value and Value value of @ConfigKey.

[0025] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, including:

[0026] one or more processors;

[0027] a storage device for storing one or more programs,

[0028] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments for implementing annotation-based configuration.

[0029] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, any of the above methods described in the embodiments based on implementing annotation-based configuration is implemented.

[0030] An embodiment of the above invention has the following advantages or beneficial effects: The present invention realizes a configuration information synchronization client with low intrusion to the business through annotation-based configuration combined with the characteristics of Spring (an open source design-level framework that solves the problem of loose coupling between the business logic layer and other layers), thereby achieving automatic conversion of configuration information and types, unifying the processing logic of configuration information, and being transparent and low-intrusive to the application.

[0031] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0033] Figure 1 is a schematic diagram of the main process of a method for implementing annotation-based configuration according to an embodiment of the present invention;

[0034] Figure 2 is a schematic diagram of the main process of a method for implementing annotation-based configuration according to a reference embodiment of the present invention;

[0035] Figure 3 is a schematic diagram of main modules of an apparatus for implementing annotation-based configuration according to an embodiment of the present invention;

[0036] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0037] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0038] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0039] Figure 1 is a schematic diagram of the main process of a method for implementing annotation-based configuration according to an embodiment of the present invention. The method for implementing annotation-based configuration may include:

[0040] Step S101, reading a configuration file to implement environment settings.

[0041] Step S102, creating a component factory class and loading component definition.

[0042] Preferably, the component used in the present invention is Bean, and the component factory class is BeanFactory. Further, BeanFactory can be created and Bean definition can be loaded.

[0043] Step S103, executing the container post-processor, then synchronizing the configuration information, and then creating a component object.

[0044] Preferably, if the adopted component is a Bean, the container post-processor is executed, and then the configuration information is synchronized, and then the Bean object is created.

[0045] In a further embodiment, when executing the container post-processor and then synchronizing the configuration information, the following process may be performed:

[0046] Parse @ConfigPath and @ConfigKey to obtain the Key value and Value value corresponding to @ConfigPath and @ConfigKey respectively.

[0047] Connect to the remote configuration center to determine whether the Key value and Value value corresponding to @ConfigPath and @ConfigKey exist.

[0048] According to the judgment result, if it exists, the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey in the remote configuration center are obtained to update them locally. If it does not exist, the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey after parsing are added in the remote configuration center.

[0049] In a further embodiment, annotations may be added to the Key value and Value value of the parsed @ConfigPath, and the Key value and Value value of the parsed @ConfigKey.

[0050] It is also worth mentioning that before updating the configuration information of the remote configuration center (that is, the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey of the remote configuration center) to the local, you can use the PropertyEditor of the Spring framework to convert the string form of the configuration information into a value of the data type corresponding to the Key.

[0051] As another reference embodiment of the present invention, Figure 2 As shown, this embodiment implements annotation-based configuration based on the characteristics of Spring, and the method for implementing annotation-based configuration may include:

[0052] Step S201, parsing property sources and profiles to complete environment settings.

[0053] Among them, the configuration file can be read by parsing property sources and profiles.

[0054] Step S202: Create a component factory class to build a container.

[0055] For example, by creating a BeanFactory (Bean factory class), an IOC (Inversion of Control) container can be obtained. Among them, the IOC (Inversion of Control) is a rule for reducing program coupling.

[0056] Step S203: load component definition.

[0057] Among them, the component definition, for example, the Bean definition (ie, BeanDefinition) is used to describe a Bean instance, including properties, constructors, parameters, and other Bean-related information.

[0058] Step S204, executing the container post-processor to synchronize the configuration information so that the configuration information of the local configuration center is consistent with that of the remote configuration center.

[0059] In the embodiment, synchronization of configuration information is performed after executing the container post-processor, which can ensure that the configuration information is in the latest state when the business logic is executed, perfectly decoupling the synchronization of configuration information and business logic, while ensuring synchronization of configuration information with the remote configuration center. The specific implementation process includes:

[0060] Step 1: Parse @ConfigPath and @ConfigKey to obtain the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey.

[0061] Step 2: Connect to the remote configuration center and determine whether the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey exist. If they exist, proceed to step 3; otherwise, proceed to step 4.

[0062] Step 3: Get the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey in the remote configuration center to update them locally.

[0063] Preferably, after obtaining the configuration information of the remote configuration center, the string form of the configuration information can be converted into the value of the data type corresponding to the Key through the PropertyEditor (used to complete the conversion between data types and strings) of the Spring framework (an open source design-level framework). The configuration information is the Key value and Value value of @ConfigPath of the remote configuration center, and the Key value and Value value of @ConfigKey.

[0064] Step 4: Add the parsed @ConfigPath Key value, Value value, and @ConfigKey Key value and Value value to the remote configuration center.

[0065] It is worth noting that you can monitor the remote configuration center after executing step 3 or step 4 to monitor the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey.

[0066] Step S205, creating a component object, which is a singleton by default.

[0067] For example, when the component is a Bean, the Bean constructor can be called to create a Bean instance to create a Bean object.

[0068] It should be noted that in the present invention, because the configuration information is static, when the configuration information needs to be referenced, it can be directly used (that is, accessed):

[0069] Class name.Attribute name

[0070] As a further embodiment of the present invention, annotations are added to the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey, thereby achieving lower intrusion into the business. That is, compared with the traditional configuration information synchronization method, the purpose of decoupling from the business logic is achieved by encapsulating the logic of configuration information synchronization into annotations and container post-processing.

[0071] Among them, @ConfigPath can indicate that this class is a configuration class, corresponding to a path in the remote configuration center, for example: value = " / yanglikun", which is the configuration path. In addition, @ConfigPath has corresponding read and write permission values, and supports the spring placeholder method to load secret keys in different operating environments according to the profile. For example: readToken = "${ucc.yanglikun.readToken}", which is to read the secret key. writeToken = "${ucc.yanglikun.writeToken}", which is to write the secret key.

[0072] Among them, @ConfigKey can represent specific configuration information (Key, Value). The default field name is the Key of the remote configuration center. Of course, it can also be customized, for example: @ConfigKey("custom_key_name"), which specifies the field value and the default field name.

[0073] Figure 3 is a device for implementing annotation-based configuration according to an embodiment of the present invention, such as Figure 3 As shown, the apparatus 300 for implementing annotation-based configuration includes a setting module 301 and a configuration module 302. The setting module 301 reads the configuration file to implement environment settings, creates a component factory class, and loads component definitions. Afterwards, the configuration module 302 executes the container postprocessor, synchronizes the configuration information, and then creates a component object.

[0074] As a further embodiment, the configuration module 302 executes the container post-processor and then synchronizes the configuration information. The specific implementation process includes:

[0075] Parse @ConfigPath and @ConfigKey to obtain the Key value and Value value corresponding to @ConfigPath and @ConfigKey respectively.

[0076] Connect to the remote configuration center and determine whether the Key value and Value value corresponding to @ConfigPath and @ConfigKey exist. According to the judgment result, if they exist, obtain the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey in the remote configuration center to update them locally. If they do not exist, add the parsed Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey in the remote configuration center.

[0077] In a preferred embodiment, annotations are added to the Key value and Value value of the parsed @ConfigPath, and the Key value and Value value of the parsed @ConfigKey.

[0078] It is also worth noting that before obtaining the Key value, Value value of @ConfigPath and the Key value and Value value of @ConfigKey of the remote configuration center, the string form of the configuration information is converted into the value of the data type corresponding to the Key through the PropertyEditor of the Spring framework. Among them, the configuration information is the Key value, Value value of @ConfigPath and the Key value and Value value of @ConfigKey of the remote configuration center.

[0079] It should be noted that the specific implementation content of the device for implementing annotation-based configuration in the present invention has been described in detail in the method for implementing annotation-based configuration described above, so the repeated content will not be described again here.

[0080] Figure 4 An exemplary system architecture 400 of a method or apparatus for implementing annotation-based configuration according to an embodiment of the present invention is shown.

[0081] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0082] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0083] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0084] The server 405 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 401, 402, and 403. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.

[0085] It should be noted that the method for implementing annotation-based configuration provided in the embodiment of the present invention is generally executed by the server 405 , and accordingly, the device for implementing annotation-based configuration is generally disposed in the server 405 .

[0086] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0087] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0088] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0089] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0090] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0091] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0092] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0093] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor. For example, it may be described as follows: a processor includes a setting module and a configuration module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.

[0094] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: reading a configuration file to implement environment settings; reading a configuration file to implement environment settings; creating a component factory class and adding component definitions; executing a container postprocessor and then synchronizing configuration information; and creating a component object.

[0095] The technical solution according to the embodiment of the present invention can solve the problems of error in conversion from character string to program type and high intrusion of logic for obtaining remote configuration information on business.

[0096] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for implementing annotation-based configuration, characterized in that: include: Read the configuration file to implement environment settings; Create a component factory class and add component definition; Execute the container post-processor and then synchronize the configuration information, including: Parse @ConfigPath and @ConfigKey to obtain the Key and Value values ​​corresponding to @ConfigPath and @ConfigKey respectively; @ConfigPath indicates that this class is a configuration class, corresponding to a path in the remote configuration center, and @ConfigPath has corresponding read and write permission values, supporting the spring placeholder method to load secret keys in different operating environments according to the profile; @ConfigKey represents configuration information, and the Key in the default information is the Key of the remote configuration center or customized; Connect to the remote configuration center to determine whether the Key value and Value value corresponding to @ConfigPath and @ConfigKey exist; If it exists, get the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey in the remote configuration center to update them locally; If it does not exist, add the parsed @ConfigPath Key value, Value value, and @ConfigKey Key value and Value value to the remote configuration center; Create a component object.

2. The method according to claim 1, characterized in that Add annotations to the parsed @ConfigPath Key value, Value value, and the parsed @ConfigKey Key value and Value value.

3. The method according to claim 1, characterized in that: Before obtaining the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey of the remote configuration center, include: The string form of the configuration information is converted into the value of the data type corresponding to the Key through the PropertyEditor of the Spring framework; the configuration information is the Key value and Value value of @ConfigPath of the remote configuration center, and the Key value and Value value of @ConfigKey.

4. A device for implementing annotation-based configuration, characterized in that: include: The settings module is used to read configuration files to implement environment settings; create component factory classes, and load component definitions; The configuration module is used to execute the container post-processor and then synchronize the configuration information to create the component object; wherein, executing the container post-processor and then synchronizing the configuration information includes: Parse @ConfigPath and @ConfigKey to obtain the Key and Value values ​​corresponding to @ConfigPath and @ConfigKey respectively; @ConfigPath indicates that this class is a configuration class, corresponding to a path in the remote configuration center, and @ConfigPath has corresponding read and write permission values, supporting the spring placeholder method to load secret keys in different operating environments according to the profile; @ConfigKey represents configuration information, and the Key in the default information is the Key of the remote configuration center or customized; Connect to the remote configuration center to determine whether the Key value and Value value corresponding to @ConfigPath and @ConfigKey exist; If it exists, get the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey in the remote configuration center to update them locally; If it does not exist, add the parsed @ConfigPath Key value, Value value, and @ConfigKey Key value and Value value to the remote configuration center.

5. The device according to claim 4, characterized in that The configuration module is also used for: Add annotations to the parsed @ConfigPath Key value, Value value, and the parsed @ConfigKey Key value and Value value.

6. The device according to claim 4, characterized in that The configuration module obtains the Key value and Value value of @ConfigPath and the Key value and Value value of @ConfigKey of the remote configuration center, including: The string form of the configuration information is converted into the value of the data type corresponding to the Key through the PropertyEditor of the Spring framework; the configuration information is the Key value and Value value of @ConfigPath of the remote configuration center, and the Key value and Value value of @ConfigKey.

7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 3.

8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • New environment isolation configuration data management method and system

    CN106681861A

  • Configuration information updating method, system, client and server

    CN106990979A