System and method for adaptively releasing application program in different environments

文档序号:856566 发布日期:2021-04-02 浏览:17次 中文

阅读说明:本技术 一种应用程序在不同环境自适应发布系统及方法 (System and method for adaptively releasing application program in different environments ) 是由 冯星 于 2020-11-20 设计创作,主要内容包括:本发明涉及一种应用程序在不同环境自适应发布系统及方法。该系统包括:配置库和至少两种应用服务器,配置库中包含每种应用服务器所匹配的配置参数;未包含配置参数的应用程序发送至配置库,配置库为应用程序配置与其将要发布应用服务器对应的配置参数,配置完成后将包含配置参数的应用程序发送至对应应用服务器。本发明将应用程序中的配置参数分离出来,设置独立的配置库来存储与各种应用服务器相匹配的配置参数,在应用程序需要发布时配置库根据发布环境进行对应配置,减小开发人员工作量,提高工作效率。(The invention relates to a system and a method for adaptively releasing application programs in different environments. The system comprises: the system comprises a configuration library and at least two application servers, wherein the configuration library comprises configuration parameters matched with each application server; and sending the application program which does not contain the configuration parameters to a configuration library, configuring the configuration parameters corresponding to the application server to be issued for the application program by the configuration library, and sending the application program containing the configuration parameters to the corresponding application server after the configuration is finished. The invention separates the configuration parameters in the application program, sets an independent configuration library to store the configuration parameters matched with various application servers, and carries out corresponding configuration according to the release environment when the application program needs to be released, thereby reducing the workload of developers and improving the working efficiency.)

1. An adaptive distribution system for application programs in different environments, comprising: the configuration library and at least two application servers, wherein the configuration library comprises configuration parameters matched with each application server;

and sending the application program which does not contain the configuration parameters to the configuration library, configuring the configuration parameters corresponding to the application server to be issued for the application program by the configuration library, and sending the application program containing the configuration parameters to the corresponding application server after the configuration is finished.

2. The adaptive distribution system for application programs in different environments as claimed in claim 1, wherein the configuration library receives the application programs which do not contain configuration parameters, and synchronously receives configuration instructions which contain information of application servers to be distributed by the application programs.

3. The adaptive issuing system for application programs in different environments according to claim 1, wherein the configuration library receives a command for adding configuration parameters, and the configuration library receives and stores configuration parameters corresponding to the newly added application server.

4. The adaptive distribution system for application programs in different environments according to claim 1, wherein the configuration library receives a delete configuration parameter command, and the configuration library deletes the configuration parameter corresponding to the application server included in the delete configuration parameter command.

5. The system of claim 1, wherein the configuration library receives an instruction to modify the configuration parameters, and the configuration library receives the modified content and modifies the stored configuration parameters.

6. An adaptive issuing method of an application program in different environments is characterized by comprising the following steps:

s1, receiving an application program which does not contain configuration parameters by a configuration library, wherein the configuration library contains at least two configuration parameters, and each configuration parameter is matched with an application server;

s2, the configuration library configures configuration parameters corresponding to the application server to be issued for the application program;

and S3, sending the application program containing the configuration parameters to the corresponding application server after the configuration is finished.

7. The method for adaptively distributing an application program in different environments according to claim 6, wherein the step S1 for the configuration library receiving an application program not containing configuration parameters comprises:

the configuration library receives an application program which does not contain configuration parameters and a configuration instruction, wherein the configuration instruction contains information of an application server to be issued by the application program.

8. The method for adaptively distributing an application program in different environments according to claim 6, further comprising:

and S4, the configuration library receives a configuration parameter increasing instruction, and the configuration library receives and stores the configuration parameters corresponding to the newly added application server.

9. The method for adaptively distributing an application program in different environments according to claim 6, further comprising:

and S5, the configuration library receives a configuration parameter deleting instruction, and the configuration library deletes the configuration parameters corresponding to the application server included in the configuration parameter deleting instruction.

10. The method for adaptively distributing an application program in different environments according to claim 6, further comprising:

and S6, the configuration library receives the configuration parameter modification instruction, and the configuration library receives the modification content and modifies the stored configuration parameters.

Technical Field

The invention relates to the field of application program adaptation, in particular to a system and a method for adaptively issuing application programs in different environments.

Background

After the application program is developed, parameter adaptation is required according to different application environments. When a software service application program in the existing release scheme is released to different environments, different labels need to be marked on the application program, the labels required by the different environments are different, and the deployment can be completed after the corresponding labels are marked. For example, a business application wants to be released to a development application server, and must be marked with dev tags; the business application program wants to be released to the test application server, and must be marked with a test label and the like. If the business application program is to be released to a plurality of environments once, a plurality of sets of business application programs marked with different labels must be prepared to complete the task, and the workload of developers is greatly increased.

Disclosure of Invention

The present invention is to provide a system and a method for adaptively issuing an application program in different environments, which address the above-mentioned drawbacks of the prior art.

The technical scheme adopted by the invention for solving the technical problems is as follows: constructing an application program adaptive distribution system in different environments, comprising: the configuration library and at least two application servers, wherein the configuration library comprises configuration parameters matched with each application server;

and sending the application program which does not contain the configuration parameters to the configuration library, configuring the configuration parameters corresponding to the application server to be issued for the application program by the configuration library, and sending the application program containing the configuration parameters to the corresponding application server after the configuration is finished.

Further, in the adaptive distribution system of the application program in different environments, when the configuration library receives the application program which does not contain the configuration parameters, the configuration library synchronously receives the configuration instruction, and the configuration instruction contains the information of the application server to be distributed by the application program.

Further, in the adaptive distribution system of the application program in different environments, the configuration library receives the instruction of adding the configuration parameters, and the configuration library receives and stores the configuration parameters corresponding to the newly added application server.

Further, in the adaptive distribution system of the application program in different environments, the configuration library receives a delete configuration parameter command, and deletes the configuration parameter corresponding to the application server included in the delete configuration parameter command.

Further, in the adaptive distribution system of the application program in different environments, the configuration library receives the command of modifying the configuration parameters, and the configuration library receives the modified content and modifies the stored configuration parameters.

In addition, the invention also provides a method for adaptively releasing the application program in different environments, which comprises the following steps:

s1, receiving an application program which does not contain configuration parameters by a configuration library, wherein the configuration library contains at least two configuration parameters, and each configuration parameter is matched with an application server;

s2, the configuration library configures configuration parameters corresponding to the application server to be issued for the application program;

and S3, sending the application program containing the configuration parameters to the corresponding application server after the configuration is finished.

Further, in the method for adaptively distributing an application program in different environments according to the present invention, the step S1 where the receiving, by the configuration library, the application program that does not include the configuration parameter includes:

the configuration library receives an application program which does not contain configuration parameters and a configuration instruction, wherein the configuration instruction contains information of an application server to be issued by the application program.

Further, the method for adaptively issuing the application program in different environments further comprises the following steps:

and S4, the configuration library receives a configuration parameter increasing instruction, and the configuration library receives and stores the configuration parameters corresponding to the newly added application server.

Further, the method for adaptively issuing the application program in different environments further comprises the following steps:

and S5, the configuration library receives a configuration parameter deleting instruction, and the configuration library deletes the configuration parameters corresponding to the application server included in the configuration parameter deleting instruction.

Further, the method for adaptively issuing the application program in different environments further comprises the following steps:

and S6, the configuration library receives the configuration parameter modification instruction, and the configuration library receives the modification content and modifies the stored configuration parameters.

The system and the method for adaptively releasing the application program in different environments have the following beneficial effects that: the invention separates the configuration parameters in the application program, sets an independent configuration library to store the configuration parameters matched with various application servers, and carries out corresponding configuration according to the release environment when the application program needs to be released, thereby reducing the workload of developers and improving the working efficiency.

Drawings

The invention will be further described with reference to the accompanying drawings and examples, in which:

FIG. 1 is a schematic structural diagram of an adaptive distribution system for application programs in different environments according to an embodiment;

fig. 2 is a flowchart of a method for adaptively issuing an application program in different environments according to an embodiment.

Detailed Description

For a more clear understanding of the technical features, objects and effects of the present invention, embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

In a preferred embodiment, referring to fig. 1, the application program in the adaptive distribution system in different environments comprises: the system comprises a configuration library and at least two application servers, wherein the configuration library is in communication connection with each application server; alternatively, the configuration library may be provided on a separate server. The operating environment of each application server is different, that is, each application server needs different configuration parameters of the application program. For example, the development environment parameters of the development application server and the test environment parameters of the test application server are different. In the embodiment, the configuration parameters in the application program are stripped, that is, the environment configuration items of the application program are separated, the configuration parameters (environment configuration items) are stored in the configuration library separately, and the configuration library comprises the configuration parameters matched with each application server; that is, the configuration library stores the configuration parameters required by the application program in each application server, and the corresponding relationship between each application server and the configuration parameters.

After a software developer completes application program development, the application program does not contain configuration parameters (environment configuration items), and the developer sends the application program which does not contain the configuration parameters (environment configuration items) to a configuration library by using a package sending program; alternatively, the wrapper program uses a trace instruction. The configuration library configures configuration parameters corresponding to the application server to be issued for the application program, and sends the application program containing the configuration parameters to the corresponding application server after the configuration is completed. Alternatively, the instruction for sending the configured application program to the corresponding application server is a trace instruction.

According to the embodiment, the configuration parameters in the application program are separated, the independent configuration library is set to store the configuration parameters matched with various application servers, and the configuration library carries out corresponding configuration according to the release environment when the application program needs to be released, so that the workload of developers is reduced, and the working efficiency is improved.

In some embodiments, in different environment adaptive publishing systems, a configuration library synchronously receives a configuration instruction when receiving an application program not including a configuration parameter, the configuration instruction includes information of an application server to be published by the application program, the configuration library reads the information of the application server in the configuration instruction, searches for a corresponding configuration parameter according to a corresponding relationship between each application server and the configuration parameter, performs corresponding configuration on the application program, and sends the application program including the configuration parameter to the corresponding application server after the configuration is completed. Alternatively, the configuration instruction is a trace instruction.

In some embodiments, in the adaptive distribution system in different environments, the configuration library receives the instruction of increasing the configuration parameters, receives and stores the configuration parameters corresponding to the newly added application server, and establishes a corresponding relationship between the newly added application server and the configuration parameters. According to the method and the device, the types of the application servers are allowed to be newly added by developers, the developers only need to add the configuration parameters corresponding to the newly added application servers in the configuration library, the application programs do not need to be modified, the newly added application servers can be repeatedly used, the workload of the developers is reduced, and the working efficiency is improved.

In some embodiments, in different environment adaptive publishing systems, the configuration library receives a delete configuration parameter command, deletes a configuration parameter corresponding to an application server included in the delete configuration parameter command, and deletes a corresponding relationship between the application server and the configuration parameter. According to the embodiment, the developer is allowed to delete the existing application server, the developer only needs to delete the configuration parameters corresponding to the newly added application server in the configuration library, the application program does not need to be modified, the workload of the developer is reduced, and the working efficiency is improved.

The application program of some embodiments is in a different environment adaptive publishing system, the configuration library receives the modify configuration parameter instruction, and the configuration library receives the modification content and modifies the stored configuration parameters. And after the modification of the configuration library is completed, the parameter configuration can be carried out on the application program again.

In a preferred embodiment, referring to fig. 2, the method for distributing an application program in different environments is applied to the system for distributing an application program in different environments of the above embodiment, and the method includes the following steps:

and S1, the configuration library receives the application program which does not contain the configuration parameters, wherein the configuration library contains at least two configuration parameters, and each configuration parameter is matched with one application server. Referring to fig. 1, the application program in the adaptive distribution system in different environments includes: the system comprises a configuration library and at least two application servers, wherein the configuration library is in communication connection with each application server; alternatively, the configuration library may be provided on a separate server. The operating environment of each application server is different, that is, each application server needs different configuration parameters of the application program. For example, the development environment parameters of the development application server and the test environment parameters of the test application server are different. In the embodiment, the configuration parameters in the application program are stripped, that is, the environment configuration items of the application program are separated, the configuration parameters (environment configuration items) are stored in the configuration library separately, and the configuration library comprises the configuration parameters matched with each application server; that is, the configuration library stores the configuration parameters required by the application program in each application server, and the corresponding relationship between each application server and the configuration parameters.

And S2, the configuration library configures the configuration parameters corresponding to the application server to be issued for the application program. After the software developer completes the application program development, the application program does not contain the configuration parameters (environment configuration items), the developer uses the package sending program to send the application program which does not contain the configuration parameters (environment configuration items) to the configuration library, and the configuration library configures the configuration parameters corresponding to the application server to be released for the application program. Alternatively, the wrapper program uses a trace instruction.

And S3, sending the application program containing the configuration parameters to the corresponding application server after the configuration is finished. And after the configuration is finished, the application program containing the configuration parameters is sent to the corresponding application server. Alternatively, the instruction for sending the configured application program to the corresponding application server is a trace instruction.

According to the embodiment, the configuration parameters in the application program are separated, the independent configuration library is set to store the configuration parameters matched with various application servers, and the configuration library carries out corresponding configuration according to the release environment when the application program needs to be released, so that the workload of developers is reduced, and the working efficiency is improved.

In the application program of some embodiments in the different environment adaptive distribution method, the step S1 in which the configuration library receives the application program not containing the configuration parameter includes: the configuration library receives the application program which does not contain the configuration parameters and the configuration instruction, wherein the configuration instruction contains information of an application server to be issued by the application program. Specifically, the configuration library receives a configuration instruction synchronously when receiving an application program which does not contain configuration parameters, the configuration instruction contains information of an application server to be issued by the application program, the configuration library reads the information of the application server in the configuration instruction, searches for corresponding configuration parameters according to the corresponding relation between each application server and the configuration parameters, performs corresponding configuration on the application program, and sends the application program containing the configuration parameters to the corresponding application server after the configuration is completed. Alternatively, the configuration instruction is a trace instruction.

The method for adaptively issuing the application program in different environments of some embodiments further comprises: s4, the configuration library receives the instruction of increasing the configuration parameters, receives and stores the configuration parameters corresponding to the newly added application server, and establishes the corresponding relationship between the newly added application server and the configuration parameters. According to the method and the device, the types of the application servers are allowed to be newly added by developers, the developers only need to add the configuration parameters corresponding to the newly added application servers in the configuration library, the application programs do not need to be modified, the newly added application servers can be repeatedly used, the workload of the developers is reduced, and the working efficiency is improved.

The method for adaptively issuing the application program in different environments of some embodiments further comprises: and S5, the configuration library receives the configuration parameter deleting instruction, deletes the configuration parameters corresponding to the application server contained in the configuration parameter deleting instruction, and deletes the corresponding relation between the application server and the configuration parameters. According to the embodiment, the developer is allowed to delete the existing application server, the developer only needs to delete the configuration parameters corresponding to the newly added application server in the configuration library, the application program does not need to be modified, the workload of the developer is reduced, and the working efficiency is improved.

The method for adaptively issuing the application program in different environments of some embodiments further comprises: and S6, the configuration library receives the configuration parameter modification instruction, and the configuration library receives the modification content and modifies the stored configuration parameters. And after the modification of the configuration library is completed, the parameter configuration can be carried out on the application program again.

According to the embodiment, the configuration parameters in the application program are separated, the independent configuration library is set to store the configuration parameters matched with various application servers, and the configuration library carries out corresponding configuration according to the release environment when the application program needs to be released, so that the workload of developers is reduced, and the working efficiency is improved.

The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.

Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

The above embodiments are merely illustrative of the technical ideas and features of the present invention, and are intended to enable those skilled in the art to understand the contents of the present invention and implement the present invention, and not to limit the scope of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should be covered by the claims of the present invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:信息系统国产化支撑服务环境

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!