Server-side Spring project startup methods and setup

Through hierarchical processing of component dependencies and parallel loading strategies for Spring projects, the problem of long startup time of Spring projects is solved, and the component loading process is optimized and startup speed is improved.

CN118394428BActive Publication Date: 2024-09-20NANJING NINGYUN NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410851290.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-09-20
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

During the Spring project startup process, due to the linear loading of component beans, it takes too long when the number of components is huge.

Method used

Through hierarchical processing based on the dependencies between components, functional components are placed on the upper component layer, and a parallel loading strategy is adopted. Different component layers are loaded serially based on dependencies, and the component loading method is optimized layer by layer.

Benefits of technology

Significantly improves the startup speed of Spring projects and optimizes the component loading process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118394428B
    Figure CN118394428B
Patent Text Reader

Abstract

The present invention proposes a server-side spring project startup method and device, which processes components in layers according to the dependency relationship between components in the spring project, so that the component loading mode can be optimized layer by layer according to the dependency relationship between components in each component layer, specifically including placing the independent functional components of each application in the upper component layer and loading them using a parallel loading strategy, while for different component layers, serial loading is performed according to the dependency relationship between the component layers. In this way, the startup speed of the spring project can be significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for starting a spring project at a server end. Background Art

[0002] During the startup of a Spring project, all component beans need to be loaded, a process also known as component bean initialization. Currently, Spring uses a linear loading method to initialize component beans, but this method can cause the entire loading process to take a very long time when the number of components is huge. Summary of the invention

[0003] One or more embodiments of this specification describe a method and device for starting a spring project on a server, which can effectively solve the problem of long time consumption in starting a Spring project in the prior art.

[0004] In a first aspect, a method for starting a server-side spring project is provided, the method comprising:

[0005] According to the dependency relationship between components in the target spring project, all components in the target spring project are layered to obtain multiple component layers with dependency relationships, and the functional components of the application are placed in the upper component layer, and there is no dependency relationship between the functional components;

[0006] According to the dependency relationship between the component layers, the component layers are loaded serially;

[0007] For the upper component layer, the functional components in the upper component layer are loaded in parallel through the sub-container;

[0008] All loaded components are merged into the root container, and the business functions of all applications in the root container are exposed through interfaces, completing the startup of the target spring project.

[0009] As an optional implementation manner of the method of the first aspect, the method further includes:

[0010] A component repository is set up in the bottom component layer, in which beans of all components are created;

[0011] Based on the dependency relationship between the multiple component layers, the parent container of the child container of the upper component layer is set as the component repository; when the component loaded by the child container of the upper component layer depends on the component in the lower component layer, the bean of the corresponding component is obtained in the parent container by searching upward.

[0012] As an optional implementation of the method of the first aspect, the components are hierarchically processed according to the dependencies between the components in the target spring project, specifically including:

[0013] The components in the target spring project are divided into a framework component layer, a basic application component layer, an upper application component layer, a spring mvc component layer and a task component layer; wherein the basic application component layer deploys the basic functional components of the application, and the basic functional components are independent of each other; the business functional components of the components are deployed in the upper application component layer, and the business functional components are independent of each other.

[0014] Specifically, according to the dependency relationship between the component layers, the component layers are loaded layer by layer, specifically including:

[0015] The framework component layer, the basic application component layer, the upper application component layer and the springmvc component layer are loaded layer by layer, and while loading the springmvc component layer, the task component layer is loaded asynchronously.

[0016] More specifically, when loading the framework component layer, the basic application component layer, the upper application component layer, the spring mvc component layer layer by layer, and the task component layer, it specifically includes:

[0017] When loading the framework component layer, each component in the framework component layer is loaded serially;

[0018] When loading the basic application component layer, each component in the basic application component layer is loaded in parallel;

[0019] When loading the upper application component layer, each component in the upper application component layer is loaded in parallel;

[0020] When loading the spring mvc component layer, each component in the spring mvc component layer is loaded serially;

[0021] When loading the task component layer, each component in the task component layer is loaded asynchronously.

[0022] In a second aspect, a server-side spring project startup device is provided, the device comprising:

[0023] Data acquisition module, configured to acquire the target spring project;

[0024] A layered processing module is configured to perform layered processing on all components in the target spring project according to the dependency relationship between the components in the target spring project, obtain multiple component layers with dependency relationships, and place the functional components of the application in the upper component layer, and there is no dependency relationship between the functional components;

[0025] The loading module is configured to load the component layers serially according to the dependency relationship between the component layers; for the upper component layer, the functional components in the upper component layer are loaded in parallel through the sub-container; all loaded components are merged into the root container, and the business functions of all applications in the root container are exposed through interfaces to complete the startup of the target spring project.

[0026] As an optional implementation of the device described in the second aspect, the layered processing module is specifically used to set a component warehouse in the bottom component layer, in which beans of all the components are created; based on the dependency relationship between the multiple component layers, the parent container of the child container of the upper component layer is set as the component warehouse.

[0027] As an optional implementation manner of the device described in the second aspect, the hierarchical processing module is specifically used to divide the components in the target spring project into a framework component layer, a basic application component layer, an upper application component layer, a spring mvc component layer and a task component layer; wherein the basic application component layer deploys the basic functional components of the application, and the basic functional components are independent of each other; the business functional components of the components are deployed in the upper application component layer, and the business functional components are independent of each other.

[0028] In a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program runs on an electronic device, the electronic device executes the above-mentioned server-side spring project startup method.

[0029] In a fourth aspect, an electronic device is provided, including:

[0030] at least one memory for storing a program;

[0031] At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the above-mentioned server-side spring project startup method.

[0032] Beneficial effect: The present invention processes components in layers according to the dependencies between components in the spring project, so that the component loading mode can be optimized layer by layer according to the dependencies between components in each component layer, which is specifically embodied in that the independent functional components of each application are placed in the upper component layer and loaded using a parallel loading strategy, while for different component layers, serial loading is performed according to the dependencies between the component layers. In this way, the startup speed of the spring project can be significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0034] Figure 1 It is a flow chart of a method for starting a server-side spring project involved in an embodiment of this specification.

[0035] Figure 2 A schematic diagram of a component layering result involved in an embodiment of this specification.

[0036] Figure 3 It is a flow chart of the server-side spring project startup method involved in the embodiments of this specification in an implementation scenario.

[0037] Figure 4 It is a structural diagram of a server-side spring project startup device involved in the embodiments of this specification.

[0038] Figure 5 It is a structural diagram of an electronic device involved in the embodiments of this specification. DETAILED DESCRIPTION

[0039] First of all, it should be noted that the terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates otherwise.

[0040] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Therefore, it should be recognized by those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0041] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0042] This specification aims to propose a solution to the problem that the current Spring project startup process takes a long time. One or more embodiments of this specification propose a server-side spring project startup method and device, which uses a component layering strategy to place each application's independent business function component in the upper component layer, so that components that do not have dependencies in the upper component layer can be loaded in parallel to optimize the Spring project startup process.

[0043] The following will further describe in detail a server-side spring project startup method and device described in one or more embodiments of this specification in conjunction with the accompanying drawings and specific embodiments of the specification, but this detailed description does not constitute a limitation on the embodiments of this specification.

[0044] Please refer to Figure 1 , Figure 1 A flowchart of a method for starting a spring project on a server is schematically provided. The method comprises steps S100 to S104:

[0045] S100: According to the dependency relationship between components in the target spring project, the components are layered to obtain multiple component layers with dependency relationships, and the functional components of the application are placed in the upper component layer, and there is no dependency relationship between the functional components.

[0046] Specifically, all components in the target spring project can be sorted and divided according to the structure directory. In the layering process, with the application as the smallest granularity, an application can be roughly divided into framework components, functional components, external service components (such as providing external service interfaces) and task components. Among applications, functional components are often independent, and a functional component contains multiple beans. Based on this, the functional components of the application can be placed in the upper component layer, and other components of the application can be placed in the lower component layer.

[0047] It should be noted that there may be dependencies between component layers. The number of component layers and the number of components in each component layer may be adaptively set according to requirements, and this embodiment does not impose any restrictions on this.

[0048] S102: According to the dependency relationship between component layers, component layers are loaded serially, and functional components in the upper component layer are loaded in parallel through sub-containers.

[0049] Because there are dependencies between component layers, when loading, you need to load the bottom component layer first, and then load each component layer layer by layer in order from the bottom to the top. In the bottom component layer, you can set up a component warehouse, in which beans of all components are created. Then, according to the dependencies between component layers, the parent container of the child container of the upper component layer is set to the component warehouse. Based on this, when the component loaded by the child container of the upper component layer depends on the component in the lower component layer, the bean of the corresponding component can be obtained in the parent container by looking up.

[0050] For the upper component layer, since the functional components applied in the component layer are independent, they can be loaded in parallel through sub-containers. In other words, if there are N independent functional components in a component layer A, sub-containers are created for each of these N functional components, and then the N components in the component layer A are loaded in parallel through the N sub-containers. The sub-containers will resolve the dependencies between the beans in these components, and then load the beans of these components according to the dependencies.

[0051] It should be noted that the number of the above sub-containers can be set according to demand, and this embodiment does not limit this.

[0052] S104: All loaded components are merged into the root container, and the business functions of all applications in the root container are exposed through interfaces, completing the startup of the target spring project.

[0053] Specifically, the MVC module in the spring framework can be used to expose the business function interfaces of all components in the root container.

[0054] The following is a further explanation of the above-mentioned server-side spring project startup method based on specific application scenarios.

[0055] Please refer to Figure 2 , Figure 2 A schematic diagram of component layering results is shown. In this scenario, the components in the target spring project are divided into a framework component layer, a basic application component layer, an upper application component layer, a spring mvc component layer, and a task component layer. Considering that applications can be divided into basic applications and business function applications, the upper component layer can be divided into a basic application component layer and an upper application component layer. The basic application component layer deploys the functional components of the basic application, and the functional components of the basic application are independent of each other. The upper application component layer deploys the functional components of the upper application, and the functional components of the upper application are independent of each other.

[0056] The framework component layer is the bottom component layer, which contains the framework components of the application, such as com / fiberhome, com / fh / iasp / sysapp, com / fh / iasp / platform, com / fh / iasp / component, and com / fh / iasp / baseapp. These framework components can have dependencies, so the framework component layer uses a subcontainer to load these framework components serially.

[0057] The basic application component layer depends on the framework component layer, which includes the functional components of the basic application, such as com.fh.iasp.app.apaas, com.fh.iasp.app.cm, com.fh.iasp.app.mainwork, com.fh.iasp.app.user_defined, and com.fh.iasp.app.xloc. There is no dependency between the functional components of these basic applications.

[0058] The upper application component layer depends on the framework component layer and the basic application component layer, which includes the functional components of independent upper applications, that is, there is no dependency between the functional components of the upper applications.

[0059] The spring mvc component layer mainly includes the control (controller) component part of each application, which depends on the framework component layer, the basic application component layer and the upper application component layer.

[0060] The task component layer mainly includes the task logic component part of each application, which depends on the framework component layer, the basic application component layer and the upper application component layer.

[0061] Based on Figure 2The dependencies between the component layers shown can determine the loading order between the component layers, specifically:

[0062] The first batch of framework component layers are loaded, and the framework layer subcontainer is used to serially load each framework component in the framework component layer.

[0063] The second batch loads the basic application component layer, and uses sub-containers to load the functional components of each basic application in the basic application component layer in parallel.

[0064] The third batch loads the upper application component layer, and uses sub-containers to load the functional components of each upper application in the upper application component layer in parallel.

[0065] The fourth batch loads the spring mvc component layer (loaded through the spring mvc container) and the task (vask) component layer. Among them, the control components in the spring mvc component layer are loaded serially using the spring mvc sub-container. The task logic components in the task component layer are loaded asynchronously using the task sub-container.

[0066] based on Figure 2 The component layering results shown can determine the process of the server project startup method in this scenario, such as Figure 3 As shown, the process includes:

[0067] Open the root container and load the basic framework components in the framework component layer;

[0068] Start the sub-container, load the functional components of each basic application in the basic application component layer, and merge the loaded components into the root container;

[0069] Start the sub-container, load the functional components of each upper-layer application in the upper-layer application component layer, and merge the loaded components into the root container;

[0070] When all the above components are loaded, load the spring mvc container, implement the interface exposure of all business functions, and complete the initialization of the spring container.

[0071] Corresponding to the above-mentioned server-side spring project startup method, this embodiment also proposes a server-side spring project startup device. It should be noted that: Figure 1 The server-side spring project startup method shown can be executed through this device, but is not limited to this device. Please refer to Figure 4 , the device comprises:

[0072] The data acquisition module 401 is configured to acquire the target spring project.

[0073] The layered processing module 402 is configured to layer all components in the target spring project according to the dependencies between the components in the target spring project, obtain multiple component layers with dependencies, and place the functional components of the application in the upper component layer, and there is no dependency between the functional components.

[0074] The loading module 403 is configured to load the component layers serially according to the dependency relationship between the component layers; for the upper component layer, the functional components in the upper component layer are loaded in parallel through the sub-container; all loaded components are merged into the root container, and the business functions of all applications in the root container are exposed through interfaces to complete the startup of the target spring project.

[0075] As for the layered processing module 402, the layered processing module 402 is specifically used to set a component warehouse in the bottom component layer, in which beans of all components are created; based on the dependency relationship between multiple component layers, the parent container of the child container of the upper component layer is set as the component warehouse. Based on this, when the component loaded by the child container of the upper component layer depends on the component in the lower component layer, the bean of the corresponding component can be obtained in the parent container by searching upward.

[0076] With respect to the layered processing module 402, the layered processing module 402 is specifically used to divide the components in the target spring project into a framework component layer, a basic application component layer, an upper-level application component layer, a spring mvc component layer and a task component layer; wherein, the basic application component layer deploys the functional components of the basic application, and the functional components of the basic application are independent of each other; the upper-level application component layer deploys the functional components of the upper-level application, and the functional components of the upper-level application are independent of each other.

[0077] Accordingly, the loading module 403 loads the framework component layer, the basic application component layer, the upper application component layer and the spring mvc component layer layer by layer, and while loading the spring mvc component layer, asynchronously loads the task component layer to avoid blocking the startup process.

[0078] Specifically, when loading the framework component layer, the loading module 403 loads each component in the framework component layer in series. When loading the basic application component layer, the loading module 403 loads each component in the basic application component layer in parallel. When loading the upper application component layer, the loading module 403 loads each component in the upper application component layer in parallel. When loading the spring mvc component layer, the loading module 403 loads each component in the spring mvc component layer in series. When loading the task component layer, the loading module 403 loads each component in the task component layer asynchronously.

[0079] For the above-mentioned server-side spring project startup device, taking the module as an example of a software functional unit, the data acquisition module 401 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance may be one or more. For example, the data acquisition module 401 may include code running on multiple hosts / virtual machines / containers. The multiple hosts / virtual machines / containers used to run the code may be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including a data center or multiple data centers with close geographical locations. Among them, usually a region may include multiple AZs.

[0080] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0081] As an example of a hardware functional unit, the data acquisition module 401 includes at least one computing device, such as a server, etc. Alternatively, the data acquisition module 401 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0082] The multiple computing devices included in the data acquisition module 401 can be distributed in the same region or in different regions. The multiple computing devices included in the data acquisition module 401 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the data acquisition module 401 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0083] In other embodiments, the data acquisition module 401 can be used to execute any step in the above-mentioned server-side spring project startup method, the layered processing module 402 can be used to execute any step in the above-mentioned server-side spring project startup method, and the loading module 403 can be used to execute any step in the above-mentioned server-side spring project startup method. The steps that the data acquisition module 401, the layered processing module 402 and the loading module 403 are responsible for implementing can be specified as needed, and the data acquisition module 401, the layered processing module 402 and the loading module 403 respectively implement different steps in the above-mentioned server-side spring project startup method to realize all the functions of the above-mentioned server-side spring project startup device.

[0084] In this implementation, the server-side spring project startup device can also be applied to computing devices such as computers and servers, or to a computing device cluster including at least one computing device, to implement the server-side spring project startup function.

[0085] In some embodiments, an electronic device is also provided. Figure 5 The electronic device includes: a bus 501, a processor 502, a memory 503 and a communication interface 504. The processor 502, the memory 503 and the communication interface 504 communicate with each other through the bus 501. It should be understood that the present application does not limit the number of processors and memories in the electronic device.

[0086] The bus 501 may be a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The use of only one line does not mean that there is only one bus or one type of bus. Bus 501 may include a path for transmitting information between various components of the electronic device (eg, processor 502, memory 503, and communication interface 504).

[0087] The processor 502 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0088] The memory 503 may include a volatile memory, such as a random access memory (RAM). The memory 503 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0089] The memory 503 stores executable program code, and the processor 502 executes the executable program code to respectively implement the functions of the aforementioned data acquisition module 401, the layered processing module 402 and the loading module 403, that is, to implement the function of the aforementioned server-side spring project startup device, thereby implementing the aforementioned server-side spring project startup method.

[0090] The communication interface 504 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the electronic device and other devices or a communication network.

[0091] In some embodiments, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned server-side spring project startup method is implemented.

[0092] The computer-readable storage medium may be any available medium that can be stored by the electronic device or a data storage device such as a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the electronic device to execute the above-mentioned server-side spring project startup method.

[0093] It is to be understood that the structure illustrated in the embodiments of this specification does not constitute a specific limitation on the system of the embodiments of this specification. In other embodiments of the specification, the above system may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0094] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0095] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0096] It should be noted that the above examples are only specific embodiments of the present invention, and the present invention is obviously not limited to the above examples, and there are many similar variations. All variations directly derived or associated from the contents disclosed by the technicians in this field should fall within the protection scope of the present invention.

Claims

1. A server-side spring project startup method, characterized in that: include: According to the dependency relationship between components in the target spring project, all components in the target spring project are layered to obtain multiple component layers with dependency relationships, and the functional components of the application are placed in the upper component layer, and there is no dependency relationship between the functional components; According to the dependency relationship between the component layers, the component layers are loaded serially; For the upper component layer, the functional components in the upper component layer are loaded in parallel through the sub-container; All loaded components are merged into the root container, and the business functions of all applications in the root container are exposed through interfaces, completing the startup of the target spring project.

2. The method according to claim 1, characterized in that Also includes: A component repository is set up in the bottom component layer, in which beans of all components are created; Based on the dependency relationship between the multiple component layers, the parent container of the child container of the upper component layer is set as the component repository; when the component loaded by the child container of the upper component layer depends on the component in the lower component layer, the bean of the corresponding component is obtained in the parent container by searching upward.

3. The method according to claim 1, characterized in that According to the dependencies between components in the target spring project, the components are processed in layers, including: The components in the target spring project are divided into a framework component layer, a basic application component layer, an upper application component layer, a spring mvc component layer and a task component layer; wherein the basic application component layer deploys the functional components of the basic application, and the functional components of the basic application are independent of each other; the upper application component layer deploys the functional components of the upper application, and the functional components of the upper application are independent of each other.

4. The method according to claim 3, characterized in that According to the dependency relationship between the component layers, the component layers are loaded layer by layer, specifically including: The framework component layer, the basic application component layer, the upper application component layer and the spring mvc component layer are loaded layer by layer, and while loading the spring mvc component layer, the task component layer is loaded asynchronously.

5. The method according to claim 4, characterized in that Also includes: When loading the framework component layer, each component in the framework component layer is loaded serially; When loading the basic application component layer, each component in the basic application component layer is loaded in parallel; When loading the upper application component layer, each component in the upper application component layer is loaded in parallel; When loading the spring mvc component layer, each component in the spring mvc component layer is loaded serially; When loading the task component layer, each component in the task component layer is loaded asynchronously.

6. A server-side spring project startup device, characterized in that: include: Data acquisition module, configured to acquire the target spring project; A layered processing module is configured to perform layered processing on all components in the target spring project according to the dependency relationship between the components in the target spring project, obtain multiple component layers with dependency relationships, and place the functional components of the application in the upper component layer, and there is no dependency relationship between the functional components; The loading module is configured to load the component layers serially according to the dependency relationship between the component layers; for the upper component layer, the functional components in the upper component layer are loaded in parallel through the sub-container; all loaded components are merged into the root container, and the business functions of all applications in the root container are exposed through interfaces to complete the startup of the target spring project.

7. The device according to claim 6, characterized in that The layered processing module is specifically used to set a component warehouse in the bottom component layer, in which beans of all the components are created; based on the dependency relationship between the multiple component layers, the parent container of the child container of the upper component layer is set as the component warehouse.

8. The device according to claim 6, characterized in that The layered processing module is specifically used to divide the components in the target spring project into a framework component layer, a basic application component layer, an upper application component layer, a spring mvc component layer and a task component layer; wherein the basic application component layer deploys the functional components of the basic application, and the functional components of the basic application are independent of each other; the upper application component layer deploys the functional components of the upper application, and the functional components of the upper application are independent of each other.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 5.

10. An electronic device, characterized in that: include: at least one memory for storing a program; At least one processor is used to execute the program stored in the memory, and when the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 5.