Method, device, electronic equipment and medium for deploying java application

By loading dependency packages sequentially during the deployment of JAVA applications, the problem of surges in intranet traffic and runtime anomalies caused by packaging and running JAVA applications is solved. This achieves consistency in the loading order of dependency packages and environmental consistency, reducing intranet traffic and storage pressure.

CN115016827BActive Publication Date: 2026-05-01CCB FINTECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CCB FINTECH CO LTD
Filing Date
2022-07-08
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

The existing methods of packaging and running Java applications can easily lead to surges in intranet traffic and runtime anomalies caused by different loading orders of dependency packages.

Method used

By loading multiple target dependency packages sequentially when deploying a Java application, and by using Maven build tools and plugins to inject dependency package loading order information into the description file, business packages and dependency packages are separated to achieve incremental updates.

Benefits of technology

It avoids dependency loading conflicts, ensures code consistency across different host machines or environments, and reduces intranet traffic and storage read/write pressure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115016827B_ABST
    Figure CN115016827B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device, equipment, storage medium and program product for deploying JAVA application, relates to the technical field of computers, and can be applied to the technical field of finance. The method comprises the following steps: in response to receiving a command for deploying JAVA application, determining a target compressed file package corresponding to the command; determining sequence information of a plurality of target dependent packages according to a description file in the target compressed file package; and loading the plurality of target dependent packages according to the sequence information to deploy the JAVA application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and can be applied to the field of financial technology, and more specifically to a method, apparatus, device, medium and program product for deploying JAVA applications. Background Technology

[0002] Currently, when developing Java applications, as the complexity of business processes increases iteratively, more and more dependency packages may be introduced. These complex dependency packages will be packaged into the release package and run together with the business package.

[0003] However, existing packaged execution methods are prone to causing a surge in intranet traffic due to the large size of the compressed package, making it relatively difficult to change the configuration; or they may lead to abnormal results due to different loading order of dependency packages. Summary of the Invention

[0004] In view of the above problems, this disclosure provides methods, apparatus, devices, media and program products for deploying Java applications, which can load multiple target dependency packages sequentially during Java application deployment, thereby avoiding dependency package loading conflicts to a certain extent and avoiding inconsistencies in code execution on different host machines or environments.

[0005] According to a first aspect of this disclosure, a method for deploying a Java application is provided, comprising: in response to receiving a command for deploying a Java application, determining a target compressed file package corresponding to the command; determining order information of a plurality of target dependency packages based on a description file in the target compressed file package; and loading the plurality of target dependency packages according to the order information to deploy the Java application.

[0006] According to an embodiment of this disclosure, the target compressed file package includes a target JAR file package; determining the order information of multiple target dependency packages based on the description file in the target compressed file package includes: determining the classpath information in the description file in the target JAR file package; and determining the order information of multiple target dependency packages based on the keyword information in the classpath information.

[0007] According to an embodiment of this disclosure, the target compressed file package includes a static data link library file; the step of loading multiple target dependency packages according to the order information to deploy a JAVA application includes: obtaining the multiple target dependency packages in the static data link library file.

[0008] According to an embodiment of this disclosure, the target compressed file package includes binary files and configuration files.

[0009] A second aspect of this disclosure provides an apparatus for deploying a Java application, comprising: a first determining module, configured to determine a target compressed file package corresponding to the command in response to receiving a command for deploying a Java application; a second determining module, configured to determine the order information of a plurality of target dependency packages based on a description file in the target compressed file package; and an application deployment module, configured to load the plurality of target dependency packages according to the order information to deploy the Java application.

[0010] A third aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the method described above for deploying a JAVA application.

[0011] A fourth aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method for deploying a JAVA application as described above.

[0012] The fifth aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method for deploying a JAVA application.

[0013] The method for deploying JAVA applications provided in this embodiment can load multiple target dependency packages sequentially during JAVA application deployment, which to some extent avoids the problem of dependency package loading conflicts, thereby avoiding the problem of inconsistent code execution on different host machines or environments. Attached Figure Description

[0014] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0015] Figure 1 The illustration schematically depicts application scenarios of methods, apparatus, devices, media, and program products for deploying JAVA applications according to embodiments of this disclosure;

[0016] Figure 2 A flowchart illustrating a method for deploying a Java application according to an embodiment of the present disclosure is shown schematically.

[0017] Figure 3 A flowchart illustrating a method for deploying a Java application according to another embodiment of this disclosure is shown schematically;

[0018] Figure 4 A schematic diagram of a target compressed file package according to an embodiment of the present disclosure is shown;

[0019] Figure 5A flowchart illustrating a method for deploying a Java application according to another embodiment of this disclosure is shown schematically; and

[0020] Figure 6 A block diagram schematically illustrates an electronic device suitable for implementing a method for deploying JAVA applications according to an embodiment of the present disclosure. Detailed Implementation

[0021] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0022] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0023] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0024] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).

[0025] Embodiments of this disclosure provide a method and apparatus for deploying a Java application. In response to receiving a command for deploying a Java application, the method determines a target compressed file package corresponding to the command; determines the order information of multiple target dependency packages based on a description file in the target compressed file package; and loads the multiple target dependency packages according to the order information to deploy the Java application.

[0026] Figure 1 The illustration schematically depicts application scenarios of methods, apparatus, devices, media, and program products for deploying JAVA applications according to embodiments of the present disclosure.

[0027] like Figure 1 As shown, application scenario 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as a medium for providing a communication link between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0028] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0029] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0030] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0031] It should be noted that the method for deploying JAVA applications provided in this disclosure embodiment can generally be executed by server 105. Correspondingly, the apparatus for deploying JAVA applications provided in this disclosure embodiment can generally be located in server 105. The method for deploying JAVA applications provided in this disclosure embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the apparatus for deploying JAVA applications provided in this disclosure embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105.

[0032] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0033] The following will be based on Figure 1 The described scene, through Figure 2The method for deploying JAVA applications according to the disclosed embodiments is described in detail.

[0034] Figure 2 A flowchart illustrating a method for deploying a Java application according to an embodiment of this disclosure is shown schematically.

[0035] like Figure 2 As shown, this embodiment includes operations S210 to S230, and the method for deploying a JAVA application can be executed by a server.

[0036] In the technical solution disclosed herein, the acquisition, collection, storage, use, processing, transmission, provision, disclosure, and application of data all comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and they do not violate public order and good morals.

[0037] In operation S210, in response to receiving a command for deploying a JAVA application, the target compressed file package corresponding to the command is determined.

[0038] In operation S220, the order information of multiple target dependency packages is determined based on the description file in the target compressed file package.

[0039] In operation S230, multiple target dependency packages are loaded according to the sequence information to deploy a Java application.

[0040] Project Object Model (Maven) is a project management and automated build tool provided by the Apache Software Foundation. Maven can manage a project's build, reporting, and documentation processes using a central information fragment.

[0041] Packaging using the Spring-boot-maven-plugin plugin essentially packages all dependency archives into a single, massive archive. This huge archive extends the standard Java package structure, so the default Java class loader cannot read and execute it correctly. A custom class loader developed using Spring is required for proper loading and execution. Current business projects are typically iteratively developed. When a specific business archive needs to be released, because all business-related dependencies are encapsulated in this massive archive, the entire archive needs to be updated. In today's microservice-centric world, updating the entire archive can cause a surge in internal network traffic. Furthermore, since related runtime configurations are also encapsulated in this massive archive, modifying these configurations becomes relatively difficult.

[0042] Considering the incremental update scenario, packaging all dependent compressed packages into a single large compressed file is not suitable. However, conventional startup commands, such as specifying the class-path folder, cannot achieve the goal of specifying the loading order. Therefore, it is necessary to add the order information of multiple dependent packages when building the target compressed file package, so as to ensure that the business compressed file package can load the target dependent packages in order at runtime.

[0043] For example, when developing Maven build and packaging scripts, you can inject relevant dependency packages, such as the loading order information of multiple business-related target dependency packages, into the description file of the target compressed file package, such as the MANIFEST.MF file. Then, start, run, and test. The target compressed file package can be like... Figure 4 As shown.

[0044] For example, project source code can be organized in Maven format, and then executed sequentially using Maven build plugins and related scripts: the maven-jar-plugin is used to analyze the order of multiple target dependency packages, and the obtained order information is injected into the description file through configuration scripts; a custom script is configured through the maven-assembly-plugin to store business file packages and dependency file packages separately, while copying some other resource files, and then packaging them into a tar.gz release package to obtain the target compressed file package; the release package is then distributed to the release host machine.

[0045] By starting a command, such as one used to deploy a Java application, the target compressed file package corresponding to that command is first determined. For example, starting the business compressed file package within the target compressed file package includes a description file. Since there is only one business compressed file package, there will be no conflicts between multiple target dependency packages due to different dependency orders. Then, the description file in the target compressed file package is read, thus determining the order information of multiple target dependency packages. The target dependency packages are then loaded one by one according to this order information to deploy the Java application. This business compressed file may also include static resources and business class protocols.

[0046] The method for deploying JAVA applications provided in this embodiment can load multiple target dependency packages sequentially during JAVA application deployment, which to some extent avoids the problem of dependency package loading conflicts, thereby avoiding the problem of inconsistent code execution on different host machines or environments.

[0047] The target compressed file package includes the target JAR file package; based on the description file in the target compressed file package, the order information of multiple target dependency packages is determined, including: based on the description file in the target JAR file package, determining the classpath information in the description file; and based on the keyword information in the classpath information, determining the order information of multiple target dependency packages.

[0048] The target compressed file package includes the target JAR file package. Based on the study of the JAR file package structure, it can be found that a JAR file package is also a compressed package. It can contain business binary content and a MANIFEST.MF description file. This MANIFEST.MF description file contains a classpath keyword, which is usually empty. However, this keyword information can be used to add additional classpaths to the classpath of the startup command, thus expanding the classpath. Therefore, order information can be written into the classpath of the description file. Then, during startup, only this JAR file package is loaded first, and other JAR packages (such as target dependencies) are loaded sequentially through the expanded classpath of this JAR file package, achieving the goal of loading specified dependencies in order.

[0049] Figure 3 A flowchart illustrating a method for deploying a Java application according to another embodiment of this disclosure is shown schematically.

[0050] like Figure 3 As shown, this embodiment includes operations S310 to S340.

[0051] When operating S310, in response to receiving a command for deploying a JAVA application, the target JAR file package corresponding to the command is determined.

[0052] When operating S320, the classpath information in the description file is determined based on the description file in the target JAR file package.

[0053] In operation S330, the order information of multiple target dependency packages is determined based on the keyword information in the classpath information.

[0054] When operating the S340, multiple target dependency packages are loaded according to the sequence information to deploy a Java application.

[0055] The method for deploying a JAVA application provided in this embodiment includes a target compressed file package containing a target JAR file package. The order information of multiple target dependency packages can be obtained by using the classpath information in the description file and the keyword information in the classpath information, thereby enabling the target dependency packages to be loaded in sequence.

[0056] The target compressed file package includes static data link library files; multiple target dependency packages are loaded according to sequential information to deploy the Java application, including: retrieving multiple target dependency packages in the static data link library files.

[0057] It is understandable that when building the target compressed file package, the business package and the dependency package can be separated, so that they can be updated incrementally and separately, which helps to reduce the pressure on intranet bandwidth and storage read and write.

[0058] For example, according to the packaging script specified by the maven-jar-plugin, Class files and MANIFEST.MF files are generated. These generated files are then packaged into a business package (i.e., a compressed business package) according to Java specifications, ensuring that the business package includes sequence information, static resources, and business class protocols (classes). Then, according to the packaging script specified by the maven-assembly-plugin, all dependency packages (i.e., multiple target dependency packages) are sent to a static data library file (such as a lib folder), isolating them from the compressed business package (i.e., the business package). Therefore, when loading target dependency packages, multiple target dependency packages can be obtained from the static data library file.

[0059] The method for deploying JAVA applications provided in this embodiment, by placing the target dependency package in a static data connection library file, facilitates the separation of business packages and dependency packages, thereby enabling incremental and separate updates and reducing the pressure on intranet bandwidth and storage read / write operations.

[0060] The target compressed file package includes binary files and configuration files.

[0061] Figure 4 A schematic diagram of a target compressed file package according to an embodiment of this disclosure is shown. See also Figure 4 The target compressed file package 400 includes a binary file 410, a configuration file 420, a static data link library file 430, and a business compressed file package 440. The binary file 410 may include binary content, such as a startup script. The configuration file 420 may include configuration information. The static data link library file 430 may include target dependency packages. The business compressed file package 440 may include a description file.

[0062] For example, based on the packaging script in the maven-assembly-plugin, relevant binary files (startup scripts) and configuration files (business configuration information) can be copied and placed in the same directory as static data link library files (such as the lib folder), and then packaged to obtain a target compressed file package, such as target compressed file package 400, which includes binary file 410, configuration file 420, static data link library file 430 and business compressed file package 440; among them, the description file in the business compressed file package 440 includes the specific order information of the target dependency packages, and the static data link library file 430 includes the specific target dependency package files.

[0063] The method for deploying JAVA applications provided in this embodiment includes a target compressed file package containing binary files and configuration files, which allows the startup script to be determined based on the binary files or the business configuration information to be determined based on the configuration files.

[0064] Based on the above-described method for deploying Java applications, this disclosure also provides an apparatus for deploying Java applications. The following will be combined with... Figure 5 The device is described in detail.

[0065] Figure 5 A schematic block diagram of an apparatus for deploying JAVA applications according to an embodiment of the present disclosure is shown.

[0066] like Figure 5 As shown, the apparatus 500 for deploying JAVA applications in this embodiment includes a first determining module 510, a second determining module 520, and an application deployment module 530.

[0067] The first determining module 510 is configured to determine the target compressed file package corresponding to the command in response to receiving a command for deploying a JAVA application; the second determining module 520 is configured to determine the order information of multiple target dependency packages according to the description file in the target compressed file package; and the application deployment module 530 is configured to load multiple target dependency packages according to the order information to deploy the JAVA application.

[0068] In some embodiments, the target compressed file package includes a target JAR file package; the second determining module is configured to: determine classpath information in the description file in the target JAR file package; and determine the order information of multiple target dependency packages based on keyword information in the classpath information.

[0069] In some embodiments, the target compressed file package includes a static data link library file; the deployment application module includes an acquisition submodule, used to acquire the plurality of target dependency packages from the static data link library file.

[0070] In some embodiments, the target compressed file package includes binary files and configuration files.

[0071] According to embodiments of this disclosure, any plurality of modules among the first determining module 510, the second determining module 520, and the deployment application module 530 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the first determining module 510, the second determining module 520, and the deployment application module 530 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented by any other reasonable means of integrating or packaging circuitry, or implemented in any one of software, hardware, and firmware methods, or in a suitable combination of any of these. Alternatively, at least one of the first determining module 510, the second determining module 520, and the deployment application module 530 may be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.

[0072] Figure 6 A block diagram schematically illustrates an electronic device suitable for implementing a method for deploying JAVA applications according to an embodiment of the present disclosure.

[0073] like Figure 6 As shown, an electronic device 600 according to an embodiment of this disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage portion 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.

[0074] RAM 603 stores various programs and data required for the operation of electronic device 600. Processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Processor 601 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 602 and / or RAM 603. It should be noted that the programs may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0075] According to embodiments of this disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to a bus 604. The electronic device 600 may also include one or more of the following components connected to the I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the storage section 608 as needed.

[0076] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0077] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 602 and / or RAM 603 and / or one or more memories other than ROM 602 and RAM 603 described above.

[0078] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the methods for deploying JAVA applications provided in embodiments of this disclosure.

[0079] When the computer program is executed by the processor 601, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0080] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and / or installed from the removable medium 611. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0081] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0082] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0083] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0084] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0085] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A method for deploying a Java application, comprising: In response to receiving a command for deploying a Java application, the target compressed file package corresponding to the command is determined; Based on the description file in the target compressed file package, determine the order information of multiple target dependency packages; as well as Multiple target dependency packages are loaded according to the order information to deploy a Java application; The target compressed file package includes a target JAR file package and static data link library files, and the target compressed file package is constructed based on the following method: The order of the multiple target dependency packages is analyzed to obtain the order information. The order information is injected into the description file of the target JAR file package. The multiple target dependency packages are sent to the static data link library file and stored separately from the target JAR file package. The target JAR file package and the static data link library file are packaged to construct a target compressed file package.

2. The method according to claim 1, wherein, The step of determining the order information of multiple target dependency packages based on the description file in the target compressed file package includes: Based on the description file in the target JAR file package, determine the classpath information in the description file; and Based on the keyword information in the classpath information, the order information of multiple target dependency packages is determined.

3. The method according to claim 1, wherein, The step of loading multiple target dependency packages according to the order information to deploy a Java application includes: In the static data link library file, obtain the multiple target dependency packages.

4. The method according to claim 1, wherein, The target compressed file package includes binary files and configuration files.

5. An apparatus for deploying Java applications, comprising: The first determining module is configured to, in response to receiving a command for deploying a JAVA application, determine the target compressed file package corresponding to the command; The second determining module is used to determine the order information of multiple target dependency packages based on the description file in the target compressed file package; as well as The application deployment module is used to load multiple target dependency packages according to the order information to deploy a Java application. The target compressed file package includes a target JAR file package and a static data link library file. The device is further configured to analyze the order of the plurality of target dependency packages, obtain the order information, inject the order information into the description file of the target JAR file package, send the plurality of target dependency packages to the static data link library file and store them separately from the target JAR file package, and package the target JAR file package and the static data link library file to construct the target compressed file package.

6. The apparatus according to claim 5, wherein, The second determining module is used for: Based on the description file in the target JAR file package, determine the classpath information in the description file; and Based on the keyword information in the classpath information, the order information of multiple target dependency packages is determined.

7. The apparatus according to claim 5, wherein, The application deployment module includes: The acquisition submodule is used to acquire the multiple target dependency packages from the static data link library file.

8. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 4.

9. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 4.

10. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • An application orchestration method and device based on an application Jar package file

    CN109471616A

  • System deployment method and device and electronic equipment

    CN109491763A