Application deployment method and device based on middleware, electronic equipment and storage medium
By modifying middleware configuration files and adopting directory deployment methods, the application deployment process is simplified, complex and time-consuming problems of the existing technology are solved, and efficient and low-cost application deployment is achieved.
Patent Information
- Application Number
- CN202411728456.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-21
AI Technical Summary
The existing application deployment methods are complex and take up a lot of time and energy from developers, making it difficult to achieve simple and efficient deployment.
The original configuration file of the application to be deployed is obtained based on pre-built middleware, modified to generate the target configuration file, and deploy the target configuration file to the specified directory using directory deployment.
It realizes simple and efficient application deployment, reduces deployment difficulty and cost, and has a simple and convenient technical solution and a wide range of applications.
Smart Images

Figure CN119668717A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a middleware-based application deployment method, device, electronic device, and storage medium. Background Art
[0002] Middleware is an independent system software or service program that is located between the operating system and application software. It shields the complexity of the underlying operating system and provides an operating and development environment for upper-level application software, allowing application software to interact with the underlying hardware and operating system more conveniently, helping users to develop and integrate complex application software flexibly and efficiently.
[0003] Application deployment refers to installing, configuring, and running developed application software in the target environment so that it can provide the expected functions and services. This process involves multiple steps and technologies to ensure that the application can run stably and efficiently in the production environment.
[0004] In the existing application deployment method, it is necessary to start with setting up a management console. After entering the management console to import the deployed application, a series of operations are performed on the console: configuring JVM parameters, configuring middleware data sources, configuring HTTP thread pools and ports, configuring development framework adaptation parameters, recompiling the application installation package, deploying the application, etc. This will take up a lot of time and energy of developers. Summary of the invention
[0005] The present application provides a middleware-based application deployment method, device, electronic device and storage medium, which can realize simple and efficient application deployment, thereby greatly reducing the deployment difficulty and effectively controlling the deployment cost.
[0006] In a first aspect, an embodiment of the present application provides a middleware-based application deployment method, the method comprising:
[0007] Obtain the original configuration file corresponding to the application to be deployed based on the pre-built middleware;
[0008] Modifying an original configuration file corresponding to the application to be deployed to obtain a target configuration file corresponding to the application to be deployed;
[0009] The target configuration file corresponding to the application to be deployed is deployed to a specified directory using a directory deployment method.
[0010] In a second aspect, the embodiment of the present application further provides a middleware-based application deployment device, the device comprising: an acquisition module, a modification module and a deployment module; wherein:
[0011] The acquisition module is used to acquire the original configuration file corresponding to the application to be deployed based on the pre-built middleware;
[0012] The modification module is used to modify the original configuration file corresponding to the application to be deployed to obtain the target configuration file corresponding to the application to be deployed;
[0013] The deployment module is used to deploy the target configuration file corresponding to the application to be deployed to a specified directory by using a directory deployment method.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0015] one or more processors;
[0016] a memory for storing one or more programs,
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the middleware-based application deployment method described in any embodiment of the present application.
[0018] In a fourth aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the middleware-based application deployment method described in any embodiment of the present application is implemented.
[0019] The embodiment of the present application proposes a middleware-based application deployment method, device, electronic device and storage medium, firstly obtains the original configuration file corresponding to the application to be deployed based on the pre-built middleware; then modifies the original configuration file corresponding to the application to be deployed to obtain the target configuration file corresponding to the application to be deployed; and then deploys the target configuration file corresponding to the application to be deployed to the specified directory by using the directory deployment method. That is to say, in the technical solution of the present application, the application deployment can be realized by modifying the configuration file. In the prior art, it is necessary to start from building a management console, enter the management console to import the deployment application, and then perform a series of operations on the control console, and the above operations will take up a lot of time and energy of the developer. Therefore, compared with the prior art, the middleware-based application deployment method, device, electronic device and storage medium proposed in the embodiment of the present application can realize simple and efficient application deployment, thereby greatly reducing the difficulty of deployment and effectively controlling the deployment cost; and the technical solution of the embodiment of the present application is simple and convenient to realize, easy to popularize, and has a wider scope of application. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A flowchart of a middleware-based application deployment method provided in one embodiment of the present application;
[0021] Figure 2 A flowchart of a middleware-based application deployment method provided in another embodiment of the present application;
[0022] Figure 3 A flowchart of a middleware-based application deployment method provided in yet another embodiment of the present application;
[0023] Figure 4 A schematic diagram of the structure of a middleware-based application deployment device provided in one embodiment of the present application;
[0024] Figure 5 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0025] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.
[0026] Figure 1 This is a flow chart of a middleware-based application deployment method provided in an embodiment of the present application. The method can be executed by a middleware-based application deployment device or electronic device. The device or electronic device can be implemented in software and / or hardware. The device or electronic device can be integrated in any smart device with network communication function. Figure 1 As shown, the middleware-based application deployment method may include the following steps:
[0027] S101. Obtain an original configuration file corresponding to an application to be deployed based on pre-built middleware.
[0028] The middleware in the embodiments of the present application may be a domestically produced trust-based middleware (Business Enterprise Server, referred to as BES). BES refers to a middleware product used in a domestically produced information technology innovation (trust-based) environment. These middleware products are intended to replace foreign middleware, improve the level of national information security, and reduce dependence on foreign technology. Domestically produced trust-based middleware usually has the characteristics of autonomous control, safety, reliability, and high performance. Most domestically produced trust-based middleware will provide a default configuration file during installation. These files are usually located in the installation directory of the middleware.
[0029] S102: Modify the original configuration file corresponding to the application to be deployed to obtain a target configuration file corresponding to the application to be deployed.
[0030] In the specific embodiment of the present application, the original configuration file can be modified according to the needs of the application, and the modified content includes but is not limited to: 1) Port number: ensure that the port number used by the application does not conflict with other services. 2) Database connection: configure the database connection string, user name and password. 3) Log configuration: configure the log level and log file path. 4) Security settings: configure security settings such as authentication, authorization and encryption.
[0031] S103: Deploy the target configuration file corresponding to the application to be deployed to a specified directory using a directory deployment method.
[0032] In this step, the target configuration files corresponding to the application to be deployed are deployed to the specified directory using directory deployment, which can ensure that the application can correctly read and use these configuration files when it starts. For example, for traditional Java applications, the location of the configuration files can be specified through system properties or configuration file paths.
[0033] The middleware-based application deployment method proposed in the embodiment of the present application first obtains the original configuration file corresponding to the application to be deployed based on the pre-built middleware; then the original configuration file corresponding to the application to be deployed is modified to obtain the target configuration file corresponding to the application to be deployed; and then the target configuration file corresponding to the application to be deployed is deployed to the specified directory using the directory deployment method. That is to say, in the technical solution of the present application, the application deployment can be achieved by modifying the configuration file. In the prior art, it is necessary to start from building a management console, enter the management console to import the deployment application, and then perform a series of operations on the control console, and the above operations will take up a lot of time and energy of the developer. Therefore, compared with the prior art, the middleware-based application deployment method proposed in the embodiment of the present application can realize simple and efficient application deployment, thereby greatly reducing the difficulty of deployment and effectively controlling the deployment cost; and the technical solution of the embodiment of the present application is simple and convenient to implement, easy to popularize, and has a wider range of applications.
[0034] Figure 2 A flow chart of a middleware-based application deployment method provided in another embodiment of the present application. The above technical solution is further optimized and expanded, and can be combined with the above optional implementation methods. Figure 2 As shown, the middleware-based application deployment method may include the following steps:
[0035] S201. Obtain an original configuration file corresponding to an application to be deployed based on pre-built middleware.
[0036] S202: Determine one or more configuration files to be modified in the original configuration files.
[0037] In this step, the Web application configuration file can be extracted from the original configuration file according to the suffix and extension of each configuration file in the original configuration file; wherein the suffix and extension of the Web application configuration file are web and xml respectively; and then the Web application configuration file is determined as the configuration file to be modified.
[0038] S203: Determine one or more configuration items to be modified in each configuration file to be modified.
[0039] In this step, the name of the configuration item corresponding to the target configuration type can be searched in each configuration file to be modified based on the name of each configuration item to be modified; if the name of the configuration item corresponding to the target configuration type is found in each configuration file to be modified, the configuration item corresponding to the name of the found configuration item is determined as the configuration item to be modified.
[0040] The target configuration type in the embodiment of the present application includes but is not limited to at least one of the following: JVM startup parameter configuration, character set configuration, reference data source configuration, class loading order configuration, server scanning parameter configuration. The present application can flexibly search and modify configuration items according to different environments and requirements to adapt to different application scenarios. Through accurate configuration search and modification, unnecessary restarts and downtime can be reduced, and the availability of the system can be improved.
[0041] S204: Based on the names of the configuration items to be modified, modify the parameters of the configuration items to be modified to obtain a target configuration file corresponding to the application to be deployed.
[0042] In this step, you can first determine the modification method corresponding to the parameters of each configuration item to be modified according to the name of each configuration item to be modified; wherein the modification method includes but is not limited to at least one of the following: true value setting, default character set setting, modification of data source reference method, default priority setting, scanning parameter setting; then use the modification method corresponding to the parameters of each configuration item to be modified to modify the parameters of each configuration item to be modified.
[0043] In one embodiment, the specific operation of setting the true value includes: configuring the JVM startup parameter in the Web application configuration file of the trusted middleware: Dcom.enterprise.web.compatibleWebsphere=true.
[0044] In an example, the specific operation of setting the default character set includes: configuring the character set according to the encoding configuration item of the application. For example, if the default character set is ISO-8859-1, if the encoding configuration before migration is ISO-8859-1, this configuration item can be ignored.
[0045] In one embodiment, the specific operation of modifying the data source reference method includes: for the original WAS environment, the suggestion of using indirect reference is directly changed to direct reference. Judgment method: Indirect reference is java:comp / env / jdbc / testcase, and direct reference is jdbc / testcase, where jdbc / testcase is the JNDI name of the data source. Indirect reference configuration method: It is necessary to configure the Web application configuration file, which is similar to the ibm-web-bnd.xml of WAS and is in the same directory as the web.xml file.
[0046] In one embodiment, the specific operation of setting the default priority includes: configuring the class loading order to be parent-first (the default is child-first).
[0047] In one embodiment, the specific operation of setting the scanning parameters includes: configuring the useAppServerScanning parameter.
[0048] Based on the name of each configuration item to be modified, the parameters of each configuration item to be modified are modified, which has the following technical effects: by modifying the configuration item name, the parameters that need to be adjusted can be accurately located to avoid affecting other configuration items; scripts can also be written to batch modify multiple configuration items to improve efficiency; in addition, permission control can be set so that only authorized users can modify specific configuration items to enhance the security of the system.
[0049] S205: Deploy the target configuration file corresponding to the application to be deployed to a specified directory using a directory deployment method.
[0050] In this step, you can use the directory deployment method to deploy the application, that is, decompress the war package to the specified directory, and then deploy it. For example, decompress the ctpdemostd.war package of the application to the / data / app / ctpdemostd directory.
[0051] The middleware-based application deployment method proposed in the embodiment of the present application first obtains the original configuration file corresponding to the application to be deployed based on the pre-built middleware; then the original configuration file corresponding to the application to be deployed is modified to obtain the target configuration file corresponding to the application to be deployed; and then the target configuration file corresponding to the application to be deployed is deployed to the specified directory using the directory deployment method. That is to say, in the technical solution of the present application, the application deployment can be achieved by modifying the configuration file. In the prior art, it is necessary to start from building a management console, enter the management console to import the deployment application, and then perform a series of operations on the control console, and the above operations will take up a lot of time and energy of the developer. Therefore, compared with the prior art, the middleware-based application deployment method proposed in the embodiment of the present application can realize simple and efficient application deployment, thereby greatly reducing the difficulty of deployment and effectively controlling the deployment cost; and the technical solution of the embodiment of the present application is simple and convenient to implement, easy to popularize, and has a wider range of applications.
[0052] Figure 3 A flow chart of a middleware-based application deployment method provided in another embodiment of the present application. The above technical solution is further optimized and expanded, and can be combined with the above optional implementation methods. Figure 3 As shown, the middleware-based application deployment method may include the following steps:
[0053] S301: Obtain an original configuration file corresponding to an application to be deployed based on pre-built middleware.
[0054] The middleware in the embodiment of the present application can be a domestically produced trust-based middleware BES. BES has at least the following advantages: 1) High performance: High concurrent processing capability: BES middleware has been optimized and designed to handle a large number of concurrent requests and support high-throughput business scenarios. Low latency: In key operations such as message delivery and transaction processing, BES middleware exhibits low latency, which improves the response speed of the system. 2) High availability and stability: Cluster support: BES middleware supports high-availability cluster deployment, and ensures the continuity and stability of the system through load balancing and failover mechanisms. Fault recovery: It has automatic fault detection and recovery functions, and can quickly switch when a node fails, reducing business interruption time. 3) Security: Multi-level security mechanism: BES middleware provides multi-level security protection measures, including identity authentication, access control, data encryption, etc., to ensure the security and integrity of data. Compliance: Comply with national information security standards and industry specifications, and meet the security requirements of governments and enterprises. 4) Compatibility and interoperability: Wide compatibility: BES middleware can seamlessly connect with domestic operating systems, databases, chips and other basic software and hardware to support the trust-based ecology. Support for mainstream technology stacks: Compatible with mainstream technology stacks such as Java EE and Spring Cloud, facilitating the migration and integration of existing systems. 5) Scalability and flexibility: Modular design: The modular architecture allows you to flexibly select and combine different components according to business needs. Dynamic expansion: Supports dynamic expansion and contraction, and can automatically adjust resource allocation according to business load to improve resource utilization.
[0055] S302. Extract a Web application configuration file from the original configuration file according to the suffix and extension of each configuration file in the original configuration file; wherein the suffix and extension of the Web application configuration file are web and xml respectively.
[0056] The suffixes and extensions of the configuration files in the embodiments of the present application may include, but are not limited to: 1) web.xml: a standard configuration file for Java Web applications, usually located in the WEB-INF directory. 2) application.properties or application.yml: a configuration file for a Spring Boot application. 3) server.xml: a configuration file for an Apache Tomcat server. 4) httpd.conf: the main configuration file for an Apache HTTP server. 5) nginx.conf: a configuration file for an Nginx server. 6) context.xml: a Tomcat application context configuration file. 7) web.config: a configuration file for a Microsoft IIS server. Therefore, in this step, the Web application configuration file can be extracted from the original configuration file; wherein the suffixes and extensions of the Web application configuration file are web and xml, respectively.
[0057] This application determines the Web application configuration file as the configuration file to be modified, which has the following technical effects: scripts can be written to batch modify multiple parameters in the Web application configuration file to improve efficiency; each time the Web application configuration file is modified, the modification time, modifier, and modification content can be recorded to facilitate subsequent auditing and backtracking; by clearly specifying the Web application configuration file, it can ensure that each modification operation follows the same rules and standards to improve configuration consistency. It can also set permission control so that only authorized users can modify the Web application configuration file, enhancing system security.
[0058] S303: Determine the Web application configuration file as the configuration file to be modified.
[0059] S304: Determine one or more configuration items to be modified in each configuration file to be modified.
[0060] In this step, the name of the configuration item corresponding to the target configuration type can be searched in each configuration file to be modified based on the name of each configuration item to be modified; if the name of the configuration item corresponding to the target configuration type is found in each configuration file to be modified, the configuration item corresponding to the name of the found configuration item is determined as the configuration item to be modified. The present application can accurately locate the configuration item that needs to be modified by searching by the name of the configuration item to avoid mistakenly modifying other configuration items; when the configuration needs to be modified urgently, the configuration item name can be used to quickly search and modify it, thereby improving the response speed. Accurate configuration search and modification can reduce unnecessary restarts and downtime, and improve system availability.
[0061] S305: Based on the names of the configuration items to be modified, modify the parameters of the configuration items to be modified to obtain a target configuration file corresponding to the application to be deployed.
[0062] In this step, the modification method corresponding to the parameters of each configuration item to be modified can be determined according to the name of each configuration item to be modified; wherein the modification method includes but is not limited to at least one of the following: true value setting, default character set setting, modification of data source reference method, default priority setting, scanning parameter setting; the parameters of each configuration item to be modified are modified using the modification method corresponding to the parameters of each configuration item to be modified. The above modification method can ensure that the modification of the configuration items is accurate and efficient, while retaining traceability and security. This can not only improve the stability and performance of the system, but also enhance the maintainability and scalability of the system.
[0063] S306: Deploy the target configuration file corresponding to the application to be deployed to the specified directory using a directory deployment method.
[0064] In a specific embodiment of the present application, the start and stop operations of the application to be deployed can also be controlled by a pre-set start and stop control tool. In one embodiment, the application start and stop operation can be performed through the . / iastool tool. Controlling the start and stop operations of the application to be deployed can bring the following technical effects: 1) Automated management: Reduce manual operations: Through the start and stop control tool, the process of starting and stopping the application can be automated, reducing manual intervention and reducing the risk of operational errors. Improve efficiency: The automated tool can quickly perform start and stop operations, saving time and labor costs. 2) Consistency: Standardized operation: The start and stop control tool can ensure that each start and stop operation is performed according to the preset steps to ensure the consistency and repeatability of the operation. Reduce human differences: Different operators may have different operating habits, and the use of tools can eliminate these differences and ensure the consistency of operations. 3) Security: Permission control: The start and stop control tool can set access rights, and only authorized users can perform start and stop operations, enhancing the security of the system. Logging: The tool can record detailed logs for each operation to facilitate auditing and troubleshooting. 4) Scalability: Support cluster management: For distributed applications, the start-stop control tool can manage the start and stop operations of multiple nodes to ensure the consistency and coordination of the cluster. Flexible configuration: The tool can support multiple configuration options to adapt to changes in different environments and needs. 5) Simplify complex operations: Simplify complex tasks: For complex start and stop processes, the start-stop control tool can encapsulate these operations into simple commands or scripts to simplify the operation steps. Environment preparation: The tool can automatically prepare the required environment before starting, such as creating necessary directories, configuration files, etc.
[0065] The present application provides a sufficiently simple and efficient application middleware deployment method under the premise of providing sufficient key security, which can effectively control the implementation cost, is not restricted by platform or language, reduces the difficulty of overall application transformation, and is therefore suitable for a wider range of middleware deployment scenarios.
[0066] The middleware-based application deployment method proposed in the embodiment of the present application first obtains the original configuration file corresponding to the application to be deployed based on the pre-built middleware; then the original configuration file corresponding to the application to be deployed is modified to obtain the target configuration file corresponding to the application to be deployed; and then the target configuration file corresponding to the application to be deployed is deployed to the specified directory using the directory deployment method. That is to say, in the technical solution of the present application, the application deployment can be achieved by modifying the configuration file. In the prior art, it is necessary to start from building a management console, enter the management console to import the deployment application, and then perform a series of operations on the control console, and the above operations will take up a lot of time and energy of the developer. Therefore, compared with the prior art, the middleware-based application deployment method proposed in the embodiment of the present application can realize simple and efficient application deployment, thereby greatly reducing the difficulty of deployment and effectively controlling the deployment cost; and the technical solution of the embodiment of the present application is simple and convenient to implement, easy to popularize, and has a wider range of applications.
[0067] Figure 4 This is a schematic diagram of the structure of a middleware-based application deployment device provided in an embodiment of the present application. Figure 4 As shown, the middleware-based application deployment device includes: an acquisition module 401, a modification module 402 and a deployment module 403; wherein,
[0068] The acquisition module 401 is used to acquire the original configuration file corresponding to the application to be deployed based on the pre-built middleware;
[0069] The modification module 402 is used to modify the original configuration file corresponding to the application to be deployed to obtain a target configuration file corresponding to the application to be deployed;
[0070] The deployment module 403 is used to deploy the target configuration file corresponding to the application to be deployed to a specified directory by using a directory deployment method.
[0071] The above-mentioned middleware-based application deployment device can execute the method provided by any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the middleware-based application deployment method provided by any embodiment of the present application.
[0072] Figure 5 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. Figure 5 A block diagram of an exemplary electronic device suitable for implementing the embodiments of the present application is shown. Figure 5 The electronic device 12 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0073] like Figure 5 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0074] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0075] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0076] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.
[0077] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0078] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0079] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, for example, implementing the middleware-based application deployment method provided in the embodiment of the present application.
[0080] The embodiment of the present application also provides a computer storage medium.
[0081] The computer-readable storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive lists) of computer-readable storage media include: 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 this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.
[0082] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals 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 a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0083] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0084] Computer program code for performing the operation of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0085] The embodiment of the present application also provides a computer program product.
[0086] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer program products, which can include one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor, which can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0087] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A middleware-based application deployment method, characterized in that: The method comprises: Obtain the original configuration file corresponding to the application to be deployed based on the pre-built middleware; Modifying an original configuration file corresponding to the application to be deployed to obtain a target configuration file corresponding to the application to be deployed; The target configuration file corresponding to the application to be deployed is deployed to a specified directory using a directory deployment method.
2. The method according to claim 1, characterized in that Modify the original configuration file corresponding to the application to be deployed, including: Determining one or more configuration files to be modified in the original configuration files; Determine one or more configuration items to be modified in each configuration file to be modified; Based on the name of each configuration item to be modified, modify the parameters of each configuration item to be modified.
3. The method according to claim 2, characterized in that Determine one or more configuration files to be modified in the original configuration file, including: Extracting a Web application configuration file from the original configuration file according to the suffix and extension of each configuration file in the original configuration file; wherein the suffix and extension of the Web application configuration file are web and xml respectively; The Web application configuration file is determined as the configuration file to be modified.
4. The method according to claim 2, characterized in that: In each configuration file to be modified, determine one or more configuration items to be modified, including: In each configuration file to be modified, search for the name of the configuration item corresponding to the target configuration type based on the name of each configuration item to be modified; If the name of the configuration item corresponding to the target configuration type is found in each configuration file to be modified, the configuration item corresponding to the name of the found configuration item is determined as the configuration item to be modified.
5. The method according to claim 4, characterized in that The target configuration type includes, but is not limited to, at least one of the following: JVM startup parameter configuration, character set configuration, reference data source configuration, class loading order configuration, and server scanning parameter configuration.
6. The method according to claim 5, characterized in that Based on the name of each configuration item to be modified, modify the parameters of each configuration item to be modified, including: According to the names of the configuration items to be modified, the modification methods corresponding to the parameters of the configuration items to be modified are determined; wherein the modification methods include but are not limited to at least one of the following: true value setting, default character set setting, modification of data source reference method, default priority setting, and scanning parameter setting; The parameters of each configuration item to be modified are modified using the modification method corresponding to the parameters of each configuration item to be modified.
7. The method according to claim 1, characterized in that The method further comprises: The start and stop operations of the application to be deployed are controlled by a pre-set start and stop control tool.
8. A middleware-based application deployment device, characterized in that: The device comprises: an acquisition module, a modification module and a deployment module; wherein, The acquisition module is used to acquire the original configuration file corresponding to the application to be deployed based on the pre-built middleware; The modification module is used to modify the original configuration file corresponding to the application to be deployed to obtain the target configuration file corresponding to the application to be deployed; The deployment module is used to deploy the target configuration file corresponding to the application to be deployed to a specified directory by using a directory deployment method.
9. An electronic device, characterized in that: include: one or more processors; a memory 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 middleware-based application deployment method according to any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the middleware-based application deployment method according to any one of claims 1 to 7 is implemented.