A method, apparatus, device, and medium for obtaining configuration information of an application.
By storing custom environment variables in a database and using a layered program model to obtain configuration information, the problem of errors in traditional software configuration is solved, enabling rapid updates and efficient development.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR GENERSOFT CO LTD
- Filing Date
- 2022-12-02
- Publication Date
- 2026-06-30
AI Technical Summary
During software updates and iterations, errors are prone to occur during traditional program configuration and application, leading to low development and testing efficiency, increasing the total program startup time, and affecting the software development cycle.
By determining custom environment variables based on the preset functional conditions of the application to be developed, storing them in the database based on the preset environment variable entity class structure, and using the preset layered program model to obtain configuration information, including custom and Spring Boot environment variable configurations, the environment variables can be updated quickly without restarting the application.
It improves the flexibility of obtaining program configuration information and development efficiency, reduces the number of times the application needs to be restarted, and enhances the efficiency of the development and testing process.
Smart Images

Figure CN115878217B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of software development technology, and in particular to a method, apparatus, device, and medium for obtaining configuration information of an application. Background Technology
[0002] With the continuous development of the internet industry, users' demands for software are gradually increasing, and the speed of software updates and iterations is also accelerating. Application configuration, as a component of software updates and iterations, has become a crucial factor determining the speed of software development.
[0003] During software updates and iterations, developers need to constantly modify configurations and start programs to self-test their work. Modifying program configurations requires careful verification of files and fields, and each modification necessitates restarting the program for application, which consumes a significant amount of time. Furthermore, in traditional program configuration and application processes, frequent configuration modifications during a project's development and testing often lead to errors. This further increases the total startup time, significantly reducing the efficiency of the development and testing process, ultimately lowering the overall project development efficiency and substantially impacting the software development cycle. Summary of the Invention
[0004] To address the aforementioned technical problems, one or more embodiments of this specification provide a method, apparatus, device, and medium for obtaining configuration information of an application.
[0005] One or more embodiments of this specification employ the following technical solutions:
[0006] This specification provides one or more embodiments of a method for obtaining configuration information of an application, the method including:
[0007] Based on the preset functional conditions of the application to be developed, determine one or more custom environment variables corresponding to the application to be developed;
[0008] Obtain the configuration information of the custom environment variable, and store the program configuration information corresponding to the custom environment variable in the database of the application to be developed based on the preset environment variable entity class structure;
[0009] Based on the configuration acquisition request information of the application to be developed, it is determined whether the application to be developed has a preset layered program model; wherein, the configuration acquisition request information includes: the identifier of the environment variable to be acquired;
[0010] Based on the judgment result, it is determined that the configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset hierarchical program model and the environment variable identifier to be acquired.
[0011] Optionally, in one or more embodiments of this specification, before storing the preset environment variable entity class structure in the database of the application to be developed, the method further includes:
[0012] Obtain the definition information of the preset environment variable entity class structure; wherein, the definition information includes: the identifier of each environment variable, the name of each environment variable, and the configuration value of each environment variable;
[0013] Based on the preset entity class definition function and the definition information, the entity classes of each environment variable are defined to obtain the preset environment variable entity class structure corresponding to each environment variable.
[0014] Optionally, in one or more embodiments of this specification, before obtaining the program configuration information corresponding to the environment variable identifier to be obtained based on the preset hierarchical program model, the method further includes:
[0015] The preset layered program model is constructed based on a first preset acquisition mechanism and a second preset acquisition mechanism; wherein, the first acquisition mechanism is to obtain configuration information based on a custom program, and the second acquisition mechanism is to obtain configuration information based on a preset Spring Boot environment variable configuration;
[0016] The construction of the preset hierarchical program model based on the preset first acquisition mechanism and the preset second acquisition mechanism specifically includes:
[0017] The first program access layer of the preset hierarchical program model is constructed based on the preset first acquisition mechanism, so as to acquire configuration information corresponding to the environment variable identifier to be acquired based on the first program access layer;
[0018] A second program access layer of the preset hierarchical program model is constructed based on a preset second acquisition mechanism, so as to acquire configuration information corresponding to the environment variable identifier to be acquired that cannot be acquired by the first program access layer.
[0019] Optionally, in one or more embodiments of this specification, based on the judgment result, determining to obtain the configuration information corresponding to the environment variable identifier to be obtained according to the preset hierarchical program model and the environment variable identifier to be obtained, specifically includes:
[0020] If the application to be developed has a preset layered program model, then the program configuration information corresponding to the environment variable identifier to be obtained is obtained based on the preset layered program model;
[0021] If the application to be developed does not have a preset layered program model, then the default configuration information corresponding to the environment variable identifier to be acquired is obtained based on the preset configuration file of the application to be developed.
[0022] Optionally, in one or more embodiments of this specification, obtaining the program configuration information corresponding to the environment variable identifier to be obtained based on the preset hierarchical program model specifically includes:
[0023] The first program access layer, based on a preset hierarchical program model, queries the database to determine whether there is configuration information corresponding to the environment variable identifier to be acquired.
[0024] If it exists, then obtain the configuration information corresponding to the environment variable identifier to be obtained;
[0025] If it is determined that there is no configuration information corresponding to the environment variable identifier to be acquired, the second program access layer based on the preset hierarchical program model queries the preset configuration file of the application to be developed to obtain the default configuration information corresponding to the environment variable identifier to be acquired.
[0026] Optionally, in one or more embodiments of this specification, the first program access layer based on a preset hierarchical program model queries the database to determine whether configuration information corresponding to the environment variable identifier to be obtained exists, specifically including:
[0027] If the database is queried according to the first program access layer of the preset hierarchical program model, and it is determined that the environment variable identifier to be obtained returned by the database is empty, then it is determined that the configuration information corresponding to the environment variable identifier to be obtained does not exist in the first program access layer.
[0028] If the database is queried by the first program access layer of the preset hierarchical program model, and it is determined that the environment variable identifier to be acquired returned by the database is not empty, then it is determined that the configuration information corresponding to the environment variable identifier to be acquired exists in the first program access layer.
[0029] Optionally, in one or more embodiments of this specification, after determining, based on the judgment result, that the configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset hierarchical program model and the environment variable identifier to be acquired, the method further includes:
[0030] If the application to be developed is completed, the application to be developed is tested based on preset test cases to obtain the application to be deployed.
[0031] Based on the preset installation method of each of the applications to be deployed, the format corresponding to the configuration information of each application to be deployed is determined, so as to construct the configuration information into the configuration file of the application to be deployed based on the format;
[0032] Image files for each of the applications to be deployed are constructed based on the configuration file, and the image files are processed according to the preset installation method to achieve the deployment of the applications.
[0033] This specification provides one or more embodiments of an application configuration information acquisition device, the device comprising:
[0034] The determining unit is used to determine one or more custom environment variables corresponding to the application to be developed based on the preset functional conditions of the application to be developed;
[0035] A storage unit is used to obtain the configuration information of the custom environment variable and store the program configuration information corresponding to the custom environment variable in the database of the application to be developed based on a preset environment variable entity class structure.
[0036] The judgment unit is used to determine whether the application to be developed has a preset layered program model based on the configuration acquisition request information of the application to be developed; wherein, the configuration acquisition request information includes: the identifier of the environment variable to be acquired;
[0037] The acquisition unit is used to determine, based on the judgment result, the default configuration information corresponding to the environment variable identifier to be acquired according to the preset segmentation program model and the environment variable identifier to be acquired.
[0038] This specification provides one or more embodiments of an application configuration information acquisition device, the device comprising:
[0039] At least one processor; and,
[0040] A memory communicatively connected to the at least one processor; wherein,
[0041] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:
[0042] Based on the preset functional conditions of the application to be developed, determine one or more custom environment variables corresponding to the application to be developed;
[0043] Obtain the configuration information of the custom environment variable, and store the program configuration information corresponding to the custom environment variable in the database of the application to be developed based on the preset environment variable entity class structure;
[0044] Based on the configuration acquisition request information of the application to be developed, it is determined whether the application to be developed has a preset layered program model; wherein, the configuration acquisition request information includes: the identifier of the environment variable to be acquired;
[0045] Based on the judgment result, it is determined that the default configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset segmentation program model and the environment variable identifier to be acquired.
[0046] This specification provides one or more embodiments of a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0047] Based on the preset functional conditions of the application to be developed, determine one or more custom environment variables corresponding to the application to be developed;
[0048] Obtain the configuration information of the custom environment variable, and store the program configuration information corresponding to the custom environment variable in the database of the application to be developed based on the preset environment variable entity class structure;
[0049] Based on the configuration acquisition request information of the application to be developed, it is determined whether the application to be developed has a preset layered program model; wherein, the configuration acquisition request information includes: the identifier of the environment variable to be acquired;
[0050] Based on the judgment result, it is determined that the default configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset segmentation program model and the environment variable identifier to be acquired.
[0051] The above-described at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects:
[0052] After obtaining the custom environment variables of the application under development, the corresponding program configuration information is stored in the database of the application under development based on a preset environment variable entity class structure. This enables rapid updates of program environment variables without restarting the application, thus meeting users' needs for quick configuration and use of environment variables. Furthermore, when obtaining configuration information based on a preset layered program model, a custom configuration retrieval method is added on top of the traditional configuration information retrieval, thereby improving the flexibility of program configuration information retrieval and increasing program development efficiency. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0054] Figure 1 A flowchart illustrating a method for obtaining configuration information of an application provided in an embodiment of this specification;
[0055] Figure 2 This specification provides a schematic diagram illustrating the acquisition of application configuration information based on a layered program model in a specific application scenario, as provided in an embodiment of this specification.
[0056] Figure 3 A schematic diagram of the internal structure of an application configuration information acquisition device provided in an embodiment of this specification;
[0057] Figure 4 A schematic diagram of the internal structure of an application configuration information acquisition device provided in an embodiment of this specification;
[0058] Figure 5 This is a schematic diagram of the internal structure of a non-volatile storage medium provided in the embodiments of this specification. Detailed Implementation
[0059] This specification provides an embodiment of a method, apparatus, device, and medium for obtaining configuration information of an application.
[0060] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0061] like Figure 1 As shown, this specification provides a flowchart illustrating a method for obtaining configuration information of an application in one or more embodiments. Figure 1 It can be seen that a method for obtaining configuration information of an application includes the following steps:
[0062] S101: Determine one or more custom environment variables corresponding to the application to be developed based on the preset functional conditions of the application to be developed.
[0063] During development, different applications may require customized or frequently modified program configuration information to adapt to user needs. This necessitates developers continuously modifying configurations, which involves restarting the application each time, resulting in significant time consumption. To address this issue, this embodiment first determines one or more custom environment variables corresponding to the application under development based on its preset functional conditions, facilitating subsequent retrieval of the custom environment variable's configuration information.
[0064] S102: Obtain the configuration information of the custom environment variable, and store the program configuration information corresponding to the custom environment variable in the database of the application to be developed based on the preset environment variable entity class structure.
[0065] After obtaining the custom environment variables of the application to be developed based on the above step S101, in order to facilitate the application to be developed to quickly find relevant information when it needs to obtain the custom environment variable configuration information, in one or more embodiments of this specification, it is necessary to set the configuration information of the custom environment variables according to user needs, thereby obtaining the configuration information of the custom environment variables, and storing the program configuration information corresponding to the custom environment variables in the database of the application to be developed according to the pre-set environment variable entity class structure. That is to say, when setting the configuration information of environment variables, for program configuration information that needs to be customized or frequently modified, the custom program configuration information is set through the interface, and stored in the database according to the pre-set environment variable configuration entity class structure.
[0066] Furthermore, in order to determine the preset environment variable entity class structure, in one or more embodiments of this specification, the method further includes the following steps before storing the preset environment variable entity class structure in the database of the application to be developed:
[0067] First, obtain the definition information of the preset environment variable entity class structure; it should be noted that the definition information includes: the identifier of each environment variable, the name of each environment variable, and the configuration value of each environment variable.
[0068] Based on the pre-set entity class definition functions and definition information, each environment variable entity class is defined to obtain the preset environment variable entity class structure corresponding to each environment variable. It should be noted that the environment variable identifier refers to the environment variable code that is allowed to be modified, which uniquely identifies an environment variable of the program. The name is the name of the environment variable configured by the corresponding program, and the value is the value of the corresponding environment variable that is set by the user. It should also be noted that, in a certain embodiment of this specification, the code for defining the environment variable entity class is as follows:
[0069] public class EnvironmentInfo{
[0070] private String code;
[0071] private String name;
[0072] private String value;
[0073] }
[0074] S103: Based on the configuration acquisition request information of the application to be developed, determine whether the application to be developed has a preset layered program model; wherein, the configuration acquisition request information includes: the identifier of the environment variable to be acquired.
[0075] To address the issue of slow application development caused by the need to restart the application when it needs to retrieve a certain environment variable during runtime, one or more embodiments of this specification determine whether the application to be developed has a pre-set layered program model based on the configuration retrieval request information of the application to be developed. It should be noted that the configuration retrieval request information includes identifiers of the environment variables to be retrieved, so as to facilitate the subsequent retrieval of the corresponding configuration information based on these identifiers.
[0076] S104: Based on the judgment result, determine that the configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset hierarchical program model and the environment variable identifier to be acquired.
[0077] After determining whether the application to be developed has a preset hierarchical program model based on the above step S103, in order to improve the speed of obtaining configuration information, in one or more embodiments of this specification, based on the judgment result obtained in the above steps, it is determined how to obtain the configuration information corresponding to the environment variable identifier to be obtained based on the preset hierarchical program model and the environment variable identifier to be obtained.
[0078] Furthermore, in one or more embodiments of this specification, before determining, based on the judgment result, to obtain the configuration information corresponding to the environment variable identifier to be obtained according to the preset hierarchical program model and the environment variable identifier to be obtained, the method further includes:
[0079] A pre-defined layered program model is constructed based on a pre-set first acquisition mechanism and a pre-set second acquisition mechanism. It should be noted that the first acquisition mechanism obtains configuration information based on a custom program, while the second acquisition mechanism obtains configuration information based on pre-defined Spring Boot environment variable configurations. Specifically, constructing the pre-defined layered program model based on the pre-defined first and second acquisition mechanisms includes the following process: First, a first program access layer of the pre-defined layered program model is constructed according to the pre-defined first acquisition mechanism to obtain configuration information corresponding to the environment variable identifier to be obtained. Then, a second program access layer of the pre-defined layered program model is constructed according to the pre-set second acquisition mechanism to obtain configuration information corresponding to the environment variable identifier that the first program access layer cannot obtain. In other words, in a certain application scenario of this specification, the program configuration acquisition process is divided into two layers: the first layer is a custom program configuration access layer, which is based on database access to implement the configuration and acquisition of custom environment variables; the second layer is a Spring Boot-based program configuration acquisition layer, which mainly obtains the default environment variable values from the program's configuration file based on the Spring Boot environment variable configuration acquisition method for program configurations not obtained by the first layer.
[0080] To improve the flexibility and efficiency of configuration information acquisition, in one or more embodiments of this specification, based on the judgment result, it is determined that the configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset hierarchical program model and the environment variable identifier to be acquired. Specifically, this includes the following steps: If the application to be developed has a preset hierarchical program model, then the program configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset hierarchical program model. If the application to be developed does not have a preset hierarchical program model, then the default configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset configuration file of the application to be developed.
[0081] Following the above process, when obtaining configuration information based on a preset hierarchical program model, such as Figure 2 As shown, in one or more embodiments of this specification, based on the judgment result, it is determined that the configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset hierarchical program model and the environment variable identifier to be acquired. Specifically, the process includes the following:
[0082] If the application to be developed has a preset layered program model, then the program configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset layered program model. If the application to be developed does not have a preset layered program model, then the default configuration information corresponding to the environment variable identifier to be acquired is obtained based on the application's preset configuration file.
[0083] To further illustrate the specific steps of obtaining the program configuration information corresponding to the environment variable identifier to be obtained according to a preset hierarchical program model in one or more embodiments of this specification, in conjunction with Figure 2 The process and method described include the following steps: First, the database is queried according to the first program access layer of the preset layered program model to determine whether configuration information corresponding to the environment variable identifier to be acquired exists; if it exists, the configuration information corresponding to the environment variable identifier to be acquired is acquired; if it is determined that no configuration information corresponding to the environment variable identifier to be acquired exists, the default configuration information corresponding to the environment variable identifier to be acquired is obtained by querying the preset configuration file of the application to be developed according to the second program access layer of the preset layered program model. It should be noted that: querying the database according to the first program access layer of the preset layered program model to determine whether configuration information corresponding to the environment variable identifier to be acquired exists specifically includes the following process: Querying the database according to the first program access layer of the preset layered program model; if it is determined that the environment variable identifier to be acquired returned by the database is empty, then it is determined that the first program access layer does not have configuration information corresponding to the environment variable identifier to be acquired. Then, querying the database according to the first program access layer of the preset layered program model; if it is determined that the environment variable identifier to be acquired returned by the database is not empty, then it is determined that the first program access layer has configuration information corresponding to the environment variable identifier to be acquired.
[0084] In addition, it should be noted that, in a certain application scenario described in this manual, the code for obtaining the default configuration information corresponding to the environment variable identifier to be obtained is shown below:
[0085] public String getDefaultValueByCode(String code){
[0086] / / Get default configuration information
[0087] String value=context.getEnvironment().getProperty(code);
[0088] return value;
[0089] }
[0090] The code for determining whether a return value is null and then retrieving the value of an environment variable accordingly is shown below:
[0091] public String getValueByCode(String code){
[0092] EnvironmentInfo info = this.getByCode(code); / / Retrieve configuration information from the database
[0093] if(info != null){ / / Check if the database return value is empty
[0094] return info.getValue(); / / If the return value is not empty, return the value configured in the environment variable.
[0095] }
[0096] return this.getDefaultValueByCode(code); / / The return value is empty, returning the default configuration information.
[0097] }
[0098] Furthermore, to improve the speed of application development and deployment, in one or more embodiments of this specification, after determining, based on the judgment result, that the configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset hierarchical program model and the environment variable identifier to be acquired, the method further includes:
[0099] If the application to be developed is completed, it is tested against pre-set test cases to obtain applications that meet the requirements for deployment. Then, based on the preset installation method for each application, the format of its configuration information is determined, and the configuration information is built into a configuration file for the application. Finally, image files for each application are built based on the configuration files, and these image files are processed according to the preset installation method to achieve application deployment.
[0100] like Figure 3 As shown, this specification provides an application configuration information acquisition device in one or more embodiments. Figure 3 It is known that a device for obtaining configuration information of an application includes:
[0101] The determining unit is used to determine one or more custom environment variables corresponding to the application to be developed based on the preset functional conditions of the application to be developed;
[0102] A storage unit is used to obtain the configuration information of the custom environment variable and store the program configuration information corresponding to the custom environment variable in the database of the application to be developed based on a preset environment variable entity class structure.
[0103] The judgment unit is used to determine whether the application to be developed has a preset layered program model based on the configuration acquisition request information of the application to be developed; wherein, the configuration acquisition request information includes: the identifier of the environment variable to be acquired;
[0104] The acquisition unit is used to determine, based on the judgment result, the default configuration information corresponding to the environment variable identifier to be acquired according to the preset segmentation program model and the environment variable identifier to be acquired.
[0105] like Figure 4 As shown, this specification provides an internal structure diagram of an application configuration information acquisition device in one or more embodiments. Figure 4 It can be seen that a device for obtaining configuration information of an application includes:
[0106] At least one processor; and,
[0107] A memory communicatively connected to the at least one processor; wherein,
[0108] The memory stores instructions executable by the at least one processor, enabling the at least one processor to:
[0109] Based on the preset functional conditions of the application to be developed, determine one or more custom environment variables corresponding to the application to be developed;
[0110] Obtain the configuration information of the custom environment variable, and store the program configuration information corresponding to the custom environment variable in the database of the application to be developed based on the preset environment variable entity class structure;
[0111] Based on the configuration acquisition request information of the application to be developed, it is determined whether the application to be developed has a preset layered program model; wherein, the configuration acquisition request information includes: the identifier of the environment variable to be acquired;
[0112] Based on the judgment result, it is determined that the default configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset segmentation program model and the environment variable identifier to be acquired.
[0113] like Figure 5 As shown, this specification provides a schematic diagram of the internal structure of a non-volatile storage medium in one or more embodiments. Figure 5It is known that a non-volatile storage medium stores computer-executable instructions, which are capable of:
[0114] Based on the preset functional conditions of the application to be developed, determine one or more custom environment variables corresponding to the application to be developed;
[0115] Obtain the configuration information of the custom environment variable, and store the program configuration information corresponding to the custom environment variable in the database of the application to be developed based on the preset environment variable entity class structure;
[0116] Based on the configuration acquisition request information of the application to be developed, it is determined whether the application to be developed has a preset layered program model; wherein, the configuration acquisition request information includes: the identifier of the environment variable to be acquired;
[0117] Based on the judgment result, it is determined that the default configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset segmentation program model and the environment variable identifier to be acquired.
[0118] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0119] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0120] The above description is merely one or more embodiments of this specification and is not intended to limit this specification. Various modifications and variations can be made to the one or more embodiments of this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of one or more embodiments of this specification should be included within the scope of the claims of this specification.
Claims
1. A method for obtaining configuration information of an application, characterized in that, The method includes: Based on the preset functional conditions of the application to be developed, determine one or more custom environment variables corresponding to the application to be developed; Obtain the configuration information of the custom environment variable, and store the program configuration information corresponding to the custom environment variable in the database of the application to be developed based on the preset environment variable entity class structure; Based on the configuration acquisition request information of the application to be developed, it is determined whether the application to be developed has a preset layered program model; wherein, the configuration acquisition request information includes: the identifier of the environment variable to be acquired; Based on the judgment result, it is determined that the configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset layered program model and the environment variable identifier to be acquired; wherein, the judgment result is the result of judging whether the application to be developed has a preset layered program model; Based on the judgment result, it is determined that the configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset hierarchical program model and the environment variable identifier to be acquired, specifically including: If the application to be developed has a preset layered program model, then the program configuration information corresponding to the environment variable identifier to be obtained is obtained based on the preset layered program model; If the application to be developed does not have a preset layered program model, then the default configuration information corresponding to the environment variable identifier to be acquired is obtained based on the preset configuration file of the application to be developed. Based on the preset hierarchical program model, the program configuration information corresponding to the environment variable identifier to be acquired is obtained, specifically including: The first program access layer, based on a preset hierarchical program model, queries the database to determine whether there is configuration information corresponding to the environment variable identifier to be acquired. If it exists, then obtain the configuration information corresponding to the environment variable identifier to be obtained; If it is determined that there is no configuration information corresponding to the environment variable identifier to be acquired, then the second program access layer based on the preset hierarchical program model queries the preset configuration file of the application to be developed to obtain the default configuration information corresponding to the environment variable identifier to be acquired. Based on the judgment result, before determining how to obtain the configuration information corresponding to the environment variable identifier to be obtained according to the preset hierarchical program model and the environment variable identifier to be obtained, the method further includes: The preset layered program model is constructed based on a first preset acquisition mechanism and a second preset acquisition mechanism; wherein, the first acquisition mechanism is to obtain configuration information based on a custom program, and the second acquisition mechanism is to obtain configuration information based on a preset Spring Boot environment variable configuration; The step of constructing the preset hierarchical program model based on the preset first acquisition mechanism and the preset second acquisition mechanism specifically includes: The first program access layer of the preset hierarchical program model is constructed based on the preset first acquisition mechanism, so as to acquire configuration information corresponding to the environment variable identifier to be acquired based on the first program access layer; A second program access layer of the preset hierarchical program model is constructed based on a preset second acquisition mechanism, so as to acquire configuration information corresponding to the environment variable identifier to be acquired that cannot be acquired by the first program access layer.
2. The method for obtaining configuration information of an application according to claim 1, characterized in that, Before the entity class structure based on preset environment variables is stored in the database of the application to be developed, the method further includes: Obtain the definition information of the preset environment variable entity class structure; wherein, the definition information includes: the identifier of each environment variable, the name of each environment variable, and the configuration value of each environment variable; Based on the preset entity class definition function and the definition information, the entity classes of each environment variable are defined to obtain the preset environment variable entity class structure corresponding to each environment variable.
3. The method for obtaining configuration information of an application according to claim 1, characterized in that, The first program access layer, based on a preset hierarchical program model, queries the database to determine whether configuration information corresponding to the environment variable identifier to be acquired exists, specifically including: If the database is queried according to the first program access layer of the preset hierarchical program model, and it is determined that the environment variable identifier to be obtained returned by the database is empty, then it is determined that the configuration information corresponding to the environment variable identifier to be obtained does not exist in the first program access layer. If the database is queried by the first program access layer of the preset hierarchical program model, and it is determined that the environment variable identifier to be acquired returned by the database is not empty, then it is determined that the configuration information corresponding to the environment variable identifier to be acquired exists in the first program access layer.
4. The method for obtaining configuration information of an application according to claim 1, characterized in that, After determining, based on the judgment result, that the configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset hierarchical program model and the environment variable identifier to be acquired, the method further includes: If the application to be developed is completed, the application to be developed is tested based on preset test cases to obtain the application to be deployed. Based on the preset installation method of each of the applications to be deployed, the format corresponding to the configuration information of each application to be deployed is determined, so as to construct the configuration information into the configuration file of the application to be deployed based on the format; Image files for each of the applications to be deployed are constructed based on the configuration file, and the image files are processed according to the preset installation method to achieve the deployment of the applications.
5. A device for obtaining configuration information of an application, characterized in that, The device includes: The determining unit is used to determine one or more custom environment variables corresponding to the application to be developed based on the preset functional conditions of the application to be developed; A storage unit is used to obtain the configuration information of the custom environment variable and store the program configuration information corresponding to the custom environment variable in the database of the application to be developed based on a preset environment variable entity class structure. The judgment unit is used to determine whether the application to be developed has a preset layered program model based on the configuration acquisition request information of the application to be developed; wherein, the configuration acquisition request information includes: the identifier of the environment variable to be acquired; The acquisition unit is used to determine, based on the judgment result, the default configuration information corresponding to the environment variable identifier to be acquired according to the preset hierarchical program model and the environment variable identifier to be acquired; wherein, the judgment result is the result of judging whether the application to be developed has a preset hierarchical program model; Based on the judgment result, it is determined that the configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset hierarchical program model and the environment variable identifier to be acquired, specifically including: If the application to be developed has a preset layered program model, then the program configuration information corresponding to the environment variable identifier to be obtained is obtained based on the preset layered program model; If the application to be developed does not have a preset layered program model, then the default configuration information corresponding to the environment variable identifier to be acquired is obtained based on the preset configuration file of the application to be developed. Based on the preset hierarchical program model, the program configuration information corresponding to the environment variable identifier to be acquired is obtained, specifically including: The first program access layer, based on a preset hierarchical program model, queries the database to determine whether there is configuration information corresponding to the environment variable identifier to be acquired. If it exists, then obtain the configuration information corresponding to the environment variable identifier to be obtained; If it is determined that there is no configuration information corresponding to the environment variable identifier to be acquired, then the second program access layer based on the preset hierarchical program model queries the preset configuration file of the application to be developed to obtain the default configuration information corresponding to the environment variable identifier to be acquired. Based on the judgment result, before determining how to obtain the configuration information corresponding to the environment variable identifier to be obtained according to the preset hierarchical program model and the environment variable identifier to be obtained, the process further includes: The preset layered program model is constructed based on a first preset acquisition mechanism and a second preset acquisition mechanism; wherein, the first acquisition mechanism is to obtain configuration information based on a custom program, and the second acquisition mechanism is to obtain configuration information based on a preset Spring Boot environment variable configuration; The step of constructing the preset hierarchical program model based on the preset first acquisition mechanism and the preset second acquisition mechanism specifically includes: The first program access layer of the preset hierarchical program model is constructed based on the preset first acquisition mechanism, so as to acquire configuration information corresponding to the environment variable identifier to be acquired based on the first program access layer; A second program access layer of the preset hierarchical program model is constructed based on a preset second acquisition mechanism, so as to acquire configuration information corresponding to the environment variable identifier to be acquired that cannot be acquired by the first program access layer.
6. A device for acquiring configuration information of an application, characterized in that, The device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, enabling the at least one processor to: Based on the preset functional conditions of the application to be developed, determine one or more custom environment variables corresponding to the application to be developed; Obtain the configuration information of the custom environment variable, and store the program configuration information corresponding to the custom environment variable in the database of the application to be developed based on the preset environment variable entity class structure; Based on the configuration acquisition request information of the application to be developed, it is determined whether the application to be developed has a preset layered program model; wherein, the configuration acquisition request information includes: the identifier of the environment variable to be acquired; Based on the judgment result, it is determined that the default configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset hierarchical program model and the environment variable identifier to be acquired; wherein, the judgment result is the result of judging whether the application to be developed has a preset hierarchical program model; Based on the judgment result, it is determined that the configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset hierarchical program model and the environment variable identifier to be acquired, specifically including: If the application to be developed has a preset layered program model, then the program configuration information corresponding to the environment variable identifier to be obtained is obtained based on the preset layered program model; If the application to be developed does not have a preset layered program model, then the default configuration information corresponding to the environment variable identifier to be acquired is obtained based on the preset configuration file of the application to be developed. Based on the preset hierarchical program model, the program configuration information corresponding to the environment variable identifier to be acquired is obtained, specifically including: The first program access layer, based on a preset hierarchical program model, queries the database to determine whether there is configuration information corresponding to the environment variable identifier to be acquired. If it exists, then obtain the configuration information corresponding to the environment variable identifier to be obtained; If it is determined that there is no configuration information corresponding to the environment variable identifier to be acquired, then the second program access layer based on the preset hierarchical program model queries the preset configuration file of the application to be developed to obtain the default configuration information corresponding to the environment variable identifier to be acquired. Based on the judgment result, before determining how to obtain the configuration information corresponding to the environment variable identifier to be obtained according to the preset hierarchical program model and the environment variable identifier to be obtained, the process further includes: The preset layered program model is constructed based on a first preset acquisition mechanism and a second preset acquisition mechanism; wherein, the first acquisition mechanism is to obtain configuration information based on a custom program, and the second acquisition mechanism is to obtain configuration information based on a preset Spring Boot environment variable configuration; The step of constructing the preset hierarchical program model based on the preset first acquisition mechanism and the preset second acquisition mechanism specifically includes: The first program access layer of the preset hierarchical program model is constructed based on the preset first acquisition mechanism, so as to acquire configuration information corresponding to the environment variable identifier to be acquired based on the first program access layer; A second program access layer of the preset hierarchical program model is constructed based on a preset second acquisition mechanism, so as to acquire configuration information corresponding to the environment variable identifier to be acquired that cannot be acquired by the first program access layer.
7. A non-volatile storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are capable of: Based on the preset functional conditions of the application to be developed, determine one or more custom environment variables corresponding to the application to be developed; Obtain the configuration information of the custom environment variable, and store the program configuration information corresponding to the custom environment variable in the database of the application to be developed based on the preset environment variable entity class structure; Based on the configuration acquisition request information of the application to be developed, it is determined whether the application to be developed has a preset layered program model; wherein, the configuration acquisition request information includes: the identifier of the environment variable to be acquired; Based on the judgment result, it is determined that the default configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset hierarchical program model and the environment variable identifier to be acquired; wherein, the judgment result is the result of judging whether the application to be developed has a preset hierarchical program model; Based on the judgment result, it is determined that the configuration information corresponding to the environment variable identifier to be acquired is obtained according to the preset hierarchical program model and the environment variable identifier to be acquired, specifically including: If the application to be developed has a preset layered program model, then the program configuration information corresponding to the environment variable identifier to be obtained is obtained based on the preset layered program model; If the application to be developed does not have a preset layered program model, then the default configuration information corresponding to the environment variable identifier to be acquired is obtained based on the preset configuration file of the application to be developed. Based on the preset hierarchical program model, the program configuration information corresponding to the environment variable identifier to be acquired is obtained, specifically including: The first program access layer, based on a preset hierarchical program model, queries the database to determine whether there is configuration information corresponding to the environment variable identifier to be acquired. If it exists, then obtain the configuration information corresponding to the environment variable identifier to be obtained; If it is determined that there is no configuration information corresponding to the environment variable identifier to be acquired, then the second program access layer based on the preset hierarchical program model queries the preset configuration file of the application to be developed to obtain the default configuration information corresponding to the environment variable identifier to be acquired. Based on the judgment result, before determining how to obtain the configuration information corresponding to the environment variable identifier to be obtained according to the preset hierarchical program model and the environment variable identifier to be obtained, the process further includes: The preset layered program model is constructed based on a first preset acquisition mechanism and a second preset acquisition mechanism; wherein, the first acquisition mechanism is to obtain configuration information based on a custom program, and the second acquisition mechanism is to obtain configuration information based on a preset Spring Boot environment variable configuration; The step of constructing the preset hierarchical program model based on the preset first acquisition mechanism and the preset second acquisition mechanism specifically includes: The first program access layer of the preset hierarchical program model is constructed based on the preset first acquisition mechanism, so as to acquire configuration information corresponding to the environment variable identifier to be acquired based on the first program access layer; A second program access layer of the preset hierarchical program model is constructed based on a preset second acquisition mechanism, so as to acquire configuration information corresponding to the environment variable identifier to be acquired that cannot be acquired by the first program access layer.