Micro-service item deployment method and device and storage medium
By pre-creating a skeleton source project with unified dependencies and matching the target template tool package based on the preset skeleton when creating a microservice project, the problems of high repetition of microservice project deployment and inconsistent specifications in the existing technology are solved, and rapid and simplified microservice project deployment and efficient maintenance are achieved.
Patent Information
- Application Number
- CN202311812492.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-06-27
AI Technical Summary
The deployment of existing microservice projects requires repeated execution of the architecture creation from scratch, and there are prone to inconsistency or conflicts between multiple microservice projects at the specification, structure and dependency levels, resulting in high late maintenance costs.
Provide a microservice project deployment method, which directly creates target microservice projects by pre-creating a skeleton source project with unified dependencies and matching the target template tool class package based on the preset skeleton when creating subsequent microservice projects.
It realizes that there is no need to repeatedly create skeletons and match template coordinates, simplifies the microservice project deployment process, reduces the time cost of system creation, and ensures the unified structure, specification and dependency of multiple microservice projects.
Smart Images

Figure CN120216047A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of microservices, and particularly to a method, device, and storage medium for deploying microservice projects. Background Art
[0002] With the continuous development of technology and the diversification of business requirements, enterprises have higher and higher requirements for software architectures. The traditional monolithic application architecture can no longer meet the needs of rapid iteration and flexible expansion, and thus the Service-Oriented Architecture (SOA) has been proposed. The idea of SOA is mainly implemented based on microservice projects.
[0003] A microservice project is a fine-grained, loosely coupled, and highly cohesive service architecture that splits an application into a group of small services, each of which is independent and can be independently deployed and upgraded. This architecture pattern enables each service to use different technologies, frameworks, and languages, thereby improving the scalability and maintainability of the system.
[0004] However, for the current deployment of microservice projects, it is necessary to repeatedly execute the creation of the architecture from scratch, and there will be inconsistencies or even conflicts in terms of specifications, structures, and dependencies among multiple microservice projects, bringing additional costs to the later-stage team maintenance. Summary of the Invention
[0005] To overcome the problems existing in the related art, the present disclosure provides a method, device, and storage medium for deploying microservice projects.
[0006] According to the first aspect of the embodiments of the present disclosure, a method for deploying a microservice project is provided, including: in response to determining to deploy a target microservice project, obtaining a preset skeleton, where the preset skeleton includes all template tool class packages for creating a microservice project, and all the template tool class packages have template coordinates that have been matched; matching the target template tool class package of the target microservice project in the preset skeleton according to the target template coordinates of the target microservice project; and creating the target microservice project according to the target template tool class package.
[0007] In an implementation manner, the preset skeleton is pre-created in the following manner: converging all template tool class packages for creating a microservice project, introducing a source project parent POM for each template tool category in all the template tool class packages, and creating a skeleton source project with unified dependencies; and publishing the skeleton source project to a preset microservice project platform.
[0008] In one implementation, a parent POM of the source project is introduced for each template tool category in the all-template-tool class package, and a skeletal source project with unified dependencies is created, including: aligning and hierarchically partitioning the abstract source project structure to obtain a service aggregation layer and a basic service layer; introducing the service aggregation layer and the basic service layer into the parent POM file of the source project respectively; setting the type tag of the introduced parent POM file of the source project to POM to converge the dependencies of the services in the service aggregation layer and the basic service layer, and creating a skeletal source project with unified dependencies.
[0009] In one implementation, the method further includes: in response to determining to update the skeletal source project, adding a preset skeletal coordinate in an integrated development environment; creating a new project and selecting the preset skeletal coordinate; and respectively matching the preset skeletal coordinate to the service aggregation layer and the basic service layer to obtain an updated skeletal source project.
[0010] In one implementation, publishing the skeletal source project to a preset microservice project platform includes: publishing the skeletal source project to a private microservice project platform; and / or publishing the skeletal source project to a public microservice project platform.
[0011] According to a second aspect of the embodiments of the present disclosure, a microservice project deployment apparatus is provided, including an acquisition unit configured to acquire a preset skeleton when it is determined to perform target microservice project deployment, where the preset skeleton includes an all-template-tool class package for creating a microservice project, and the all-template-tool class package has template coordinates that have been completely matched; a matching unit configured to match a target template tool class package of the target microservice project in the preset skeleton according to the target template coordinates of the target microservice project; and a creation unit configured to create the target microservice project according to the target template tool class package.
[0012] In one implementation, the creation unit is further configured to pre-create the preset skeleton in the following manner: converge all template tool class packages for creating a microservice project, introduce a parent POM of the source project for each template tool category in the all-template-tool class package, and create a skeletal source project with unified dependencies; and publish the skeletal source project to a preset microservice project platform.
[0013] In one implementation, the creation unit introduces each template tool category in the all-template tool class package into the parent POM of the source project in the following manner to create a skeleton source project with unified dependencies: abstract the source project structure for alignment and layering to obtain a service aggregation layer and a basic service layer; introduce the service aggregation layer and the basic service layer into the parent POM file of the source project respectively; set the type tag introduced into the parent POM file of the source project to POM to converge the dependencies of the services in the service aggregation layer and the basic service layer, and create a skeleton source project with unified dependencies.
[0014] In one implementation, the creation unit is further configured to: in response to determining to update the skeleton source project, add a preset skeleton coordinate in the integrated development environment; create a new project and select the preset skeleton coordinate; match the preset skeleton coordinate to the service aggregation layer and the basic service layer respectively to obtain an updated skeleton source project.
[0015] In one implementation, the creation unit publishes the skeleton source project to a preset microservice project platform in the following manner: publish the skeleton source project to a private microservice project platform; and / or publish the skeleton source project to a public microservice project platform.
[0016] According to a third aspect of the embodiments of the present disclosure, there is provided a microservice project deployment device, including: a memory for storing instructions; and a processor for calling the instructions stored in the memory to execute the microservice deployment method in the first aspect or any implementation manner of the first aspect.
[0017] According to a fourth aspect of the embodiments of the present disclosure, there is provided a storage medium storing instructions, which when executed by a processor, execute the microservice deployment method in the first aspect or any implementation manner of the first aspect.
[0018] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: when it is determined to deploy a target microservice project, match the target template tool class package of the target microservice project in a preset skeleton according to the target template coordinate of the target microservice project. The preset skeleton includes all template tool class packages for creating microservice projects, and all template tool class packages have template coordinates that have been matched. Therefore, creating the target microservice project according to the target template tool class package can eliminate the need to create a skeleton and match template coordinates. Therefore, through the present disclosure, a system can be quickly created through a skeleton, ensuring the structural unity, specification unity, and dependency unity of multiple microservices in the microservice architecture, and reducing the time cost of system creation.
[0019] It should be understood that the above general description and subsequent detailed description are only exemplary and explanatory, and cannot limit the present disclosure. Description of the Drawings
[0020] The drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present disclosure and, together with the specification, are used to explain the principles of the present disclosure.
[0021] Figure 1 It is a flowchart of a method for deploying a microservice project shown according to an exemplary embodiment.
[0022] Figure 2 It is a flowchart of a method for deploying a microservice project shown according to an exemplary embodiment.
[0023] Figure 3 It is a schematic diagram of the implementation process of converging all template tool class packages shown according to an exemplary embodiment.
[0024] Figure 4 It is a flowchart of a method for introducing the source project parent POM for each template tool category in all template tool class packages and creating a skeleton source project with unified dependencies according to an exemplary embodiment.
[0025] Figure 5 It shows a schematic diagram of the process of creating a skeleton source project and publishing the project skeleton in an exemplary embodiment.
[0026] Figure 6 It shows a flowchart of a method for updating a skeleton source project shown in an exemplary embodiment.
[0027] Figure 7 It is a block diagram of a device for deploying a microservice project shown according to an exemplary embodiment.
[0028] Figure 8 It is a block diagram of a device for microservice project deployment shown according to an exemplary embodiment.
[0029] Figure 9 It is a block diagram of a device for microservice deployment project shown according to an exemplary embodiment. Detailed Description of the Embodiments
[0030] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure.
[0031] The technical solution of the disclosed example can be used in the technical scenario of microservice project deployment. A microservice project can also be referred to as a microservice. In a microservice architecture, a complex and large system is split into multiple subsystems with independent functions and aggregated services.
[0032] In the related art, the following one or more architecture deployment methods can be adopted for microservice project deployment:
[0033] Method 1: Package the system as a war package and directly deploy it under the Servlet container directory (such as Tomcat). At this time, the means can adopt the Maven skeleton: maven-archetype-webapp.
[0034] Method 2: Adopt the SSH (Spring + Struts2 + Hibernate) architecture. In this way, the routing of requests and DB access are directly encapsulated through componentization, greatly shortening the processing of middleware when users implement the system.
[0035] Method 3: Adopt the SSM (Spring + SpringMVC + MyBatis) framework, and later Spring Boot emerged.
[0036] The above methods directly accelerate the time for R & D personnel to implement a system, shortening the time-consuming for creating a microservice architecture from scratch, or which can also be called from 0 to 1. However, the above frameworks solve the problem from 0 to 1. Combining with the current microservice architecture, when multiple systems are implemented, the above frameworks will be repeatedly executed to complete from 0 to 1, which is a repetitive and inefficient action. And with the adjustment of the team organizational structure and the introduction of new modules, it is bound to cause inconsistencies or even conflicts among multiple microservice systems in terms of specifications, structures, and dependencies, bringing additional costs to the later team maintenance.
[0037] How to simply and efficiently create and deploy microservice projects, reduce the time-consuming from 0 to 1, and ensure the structural unity, specification unity, and dependency unity of so many subsystems is a topic that needs to be studied by R & D personnel.
[0038] Therefore, the present disclosure provides a method for deploying a microservice project, which pre-creates a skeleton, and the skeleton includes all template tool class packages for creating a microservice project, and all the template tool class packages have template coordinates that have been matched. By pre-creating a preset skeleton, when creating a microservice project subsequently, a target project is created based on the preset skeleton, without the need to create based on the skeleton again, and there is no need to match the template coordinates with the template tool class packages, realizing simple and efficient deployment of the microservice project. Moreover, creating a microservice project based on a unified preset skeleton ensures that the system implemented based on this solution conforms to unified specifications, standards, and structures.
[0039] The microservice project deployment method provided by the embodiments of the present disclosure can be executed by any device capable of executing this method. For example, a computer, a server, and an intelligent terminal, etc.
[0040] Figure 1 is a flowchart of a microservice project deployment method shown according to an exemplary embodiment, as Figure 1 shown, the microservice project deployment method is used in a terminal and includes the following steps.
[0041] In step S11, in response to determining to deploy a target microservice project, obtain a preset skeleton.
[0042] In one implementation, the target microservice project can be one or more new microservice projects to be created after business project establishment.
[0043] In one implementation, the preset skeleton includes all template tool class packages for creating a microservice project, and all the template tool class packages have template coordinates that have been matched.
[0044] In step S12, according to the target template coordinates of the target microservice project, match the target template tool class package of the target microservice project in the preset skeleton;
[0045] In step S13, create a target microservice project according to the target template tool class package.
[0046] The microservice project deployment method provided by the embodiments of the present disclosure, when it is determined to deploy a target microservice project, according to the target template coordinates of the target microservice project, matches the target template tool class package of the target microservice project in a preset skeleton. The preset skeleton includes all template tool class packages for creating microservice projects, and all template tool class packages have template coordinates that have been matched. Therefore, according to the target template tool class package, creating the target microservice project can eliminate the need to create a skeleton and the need to match template coordinates. Therefore, through the present disclosure, a system can be quickly created through a skeleton, ensuring the structural unity, specification unity, and dependency unity of multiple microservices in the microservice architecture, and reducing the time cost of system creation.
[0047] The embodiments of the present disclosure will hereinafter describe the creation process of the preset skeleton.
[0048] Figure 2 It is a flowchart of a microservice project deployment method shown in an exemplary embodiment of the present disclosure. Refer to Figure 2 As shown, it includes the following steps:
[0049] In step S21, converge all template tool class packages for creating microservice projects, introduce a source project parent project object model (Project Object Model, POM) for each template tool category in all template tool class packages, and create a skeleton source project with unified dependencies.
[0050] In the embodiments of the present disclosure, a manual operation method can be adopted to operate on all template tool class packages for creating microservice projects, so that the device for the skeleton scenario can obtain all template tool class packages for creating microservice projects.
[0051] Among them, in the embodiments of the present disclosure, converging all template tool class packages for creating microservice projects can also be understood as converging dependencies and their versions, or can also be understood as converging structures and specifications.
[0052] The following takes converging dependencies and their versions as an example for description. The implementation processes for structures and specifications are similar and will not be elaborated here.
[0053] Among them, a dependency can also be understood as a dependency item. A dependency item refers to external libraries, modules, or components that a software or system requires during the running or compilation process. These external libraries, modules, or components are essential for the normal operation of the software. They are external resources or codes necessary for building and running the software.
[0054] The dependent version refers to the specific version number of a specific dependency library. In a project, different dependency libraries may need to use different version numbers to meet specific requirements. By uniformly managing the dependency versions, it can be ensured that all the dependency libraries used in the project are compatible and there will be no version conflict issues.
[0055] In the embodiments of the present disclosure, the convergent dependency and the dependent version can be understood as existing concepts in the microservices architecture, which can help developers better manage the dependency relationships in the project, improve the development efficiency and code quality. The embodiments of the present disclosure do not make any limitations here.
[0056] In the embodiments of the present disclosure, after the convergent dependency and the dependent version, the convergent dependency and the dependent version can be uniformly maintained in the parent POM.
[0057] Figure 3 It is a schematic diagram of the implementation process of a tool class package for converging all templates shown in an exemplary embodiment of the present disclosure. Refer to Figure 3 As shown, it mainly includes converging the dependencies of the microservices project (such as converging the versions of the microservices dependencies) and uniformly maintaining the versions in the parent POM project.
[0058] Among them, the parent POM can be understood as the item POM file. The parent POM file can be inherited by multiple sub-modules. The sub-modules can inherit the configuration information in the parent POM. The parent POM usually contains some basic configuration information, such as the coordinates of the project, developer information, build configuration, etc. The parent POM file is usually named pom.xml and does not contain any code.
[0059] Among them, maintaining the version in the parent POM project can be understood as setting the type tag to
pom
jar
war
[0060] In the embodiments of the present disclosure, after converging all the project dependencies, the template coordinates of each dependency and the dependency version in all the tool class packages can be matched, so that when creating a microservices project subsequently, there is no need to perform the matching again, simplifying the creation of the microservices project.
[0061] Based on the above, a skeleton source project with unified dependencies is obtained.
[0062] In step S22, the skeleton source project is published to a preset microservices project platform.
[0063] In the embodiments of the present disclosure, publishing a skeleton source project with unified dependencies to a preset microservice project platform enables, when creating a microservice project subsequently, directly invoking the skeleton source project with unified dependencies, specifications, and structures from the preset microservice project platform for microservice project deployment, without the need to create an architecture from scratch, thus simplifying the microservice project creation process. Moreover, since the skeleton source project has unified dependencies, specifications, and structures, the microservice projects created based on this skeleton source project subsequently can achieve unified structures, unified specifications, and unified dependencies.
[0064] The following embodiments of the present disclosure illustrate the implementation process of creating a skeleton source project.
[0065] Figure 4 It is a flowchart of a method for introducing a source project parent POM for each template tool category in all template tool class packages to create a skeleton source project with unified dependencies, shown according to an exemplary embodiment of the present disclosure. Refer to Figure 4 As shown, it includes the following steps:
[0066] In step S31, the abstract source project structure is aligned and layered to obtain a service aggregation layer and a basic service layer.
[0067] In step S32, the service aggregation layer and the basic service layer are respectively introduced into the source project parent POM file.
[0068] In step S33, the type tag introduced into the source project parent POM file is set to POM to converge the dependencies of the services in the service aggregation layer and the basic service layer, creating a skeleton source project with unified dependencies.
[0069] In the embodiments of the present disclosure, after creating a skeleton source project with unified dependencies, the skeleton source project can be packaged and deployed to a microservice project platform, such as deployed to an enterprise private server to release the project skeleton.
[0070] Figure 5 It shows a schematic diagram of the process of creating a skeleton source project and releasing the project skeleton in an exemplary embodiment of the present disclosure. Refer to Figure 5 As shown, the project structure is layered to obtain a service aggregation layer and a basic service layer respectively. Different project structure layering can be understood as different types of projects. For each type of project, a parent POM is introduced, and unified dependency settings are made for all layer services in the service aggregation layer and the basic service layer. The layered application is used as a skeleton source project for packaging. In response to completing the packaging of the skeleton and deploying it to the enterprise private server, the project skeleton is released.
[0071] In one implementation, publishing a skeleton source project to a preset microservice project platform includes: publishing the skeleton source project to a private microservice project platform; and / or publishing the skeleton source project to a public microservice project platform.
[0072] In some implementations, as the scale iterates and it is found that there are updates to dependencies or common capabilities, it is necessary to iteratively publish the skeleton to ensure that when using the skeleton to generate a system, the specifications, structure, and dependencies of the new system are updated in real time. Therefore, in an exemplary embodiment of the present disclosure, after packaging the skeleton, deploying it to an enterprise private server, and publishing the project skeleton, if a version iteration update occurs, it is necessary to re-update, package, and deploy the skeleton source project.
[0073] Figure 6 The flowchart of a method for updating a skeleton source project shown in an exemplary embodiment of the present disclosure is shown.
[0074] In step S41, in response to determining to update the skeleton source project, add a preset skeleton coordinate in an integrated development environment.
[0075] In the embodiments of the present disclosure, a skeleton coordinate can be added in an integrated development environment such as IDEA.
[0076] In step S42, create a new project and select the preset skeleton coordinate.
[0077] In step S43a, match the preset skeleton coordinate to the service aggregation layer to obtain an updated skeleton source project.
[0078] In step S43b, match the preset skeleton coordinate to the basic service layer to obtain an updated skeleton source project.
[0079] Among them, matching the preset skeleton coordinate to the service aggregation layer and / or the basic service layer can also be understood as selecting an aggregation layer service skeleton and / or selecting a basic layer service skeleton to update the template tool class package corresponding to the preset skeleton coordinate.
[0080] The present disclosure obtains an existing microservice project, in response to updating the existing microservice project to obtain a target microservice project, obtains an updated preset skeleton, and the updated one includes all template tool class packages for the original microservice project and creating the target microservice project, and all template tool class packages have template coordinates that have been matched; match the target template tool class package of the target microservice project in the updated one according to the target template coordinate of the target microservice project; create the target microservice project according to the target template tool class package.
[0081] In the embodiments of the present disclosure, based on a pre-created skeleton, a microservice project can be directly created using this skeleton subsequently, achieving the definition of the source skeleton of the microservice architecture once, packaging the source skeleton into a skeleton source project, such as a Maven skeleton, and then quickly creating a system through the skeleton, ensuring the structural unity, specification unity, and dependency unity of multiple microservices in the contemporary microservice architecture, while reducing the time cost of system creation.
[0082] Among them, Table 1 below shows the effect comparison between the microservice project creation method provided by the embodiments of the present disclosure and the traditional method, taking the typical aggregation layer service and basic layer service system architectures as examples:
[0083] Table 1
[0084]
[0085] Based on the same concept, the embodiments of the present disclosure also provide a microservice project deployment device.
[0086] It can be understood that in order to implement the above functions, the microservice project deployment device provided by the embodiments of the present disclosure includes the corresponding hardware structure and / or software module for executing each function. Combining the units and algorithm steps of the various examples disclosed in the embodiments of the present disclosure, the embodiments of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiments of the present disclosure.
[0087] Figure 7 is a block diagram of a microservice project deployment device shown according to an exemplary embodiment. Referring to Figure 7 , the device 100 includes an acquisition unit 101, a matching unit 102, and a creation unit 103.
[0088] The acquisition unit 101 is configured to obtain a preset skeleton when it is determined to perform the deployment of a target microservice project. The preset skeleton includes all template tool class packages for creating a microservice project, and all the template tool class packages have template coordinates that have been matched. The matching unit 102 is configured to match the target template tool class package of the target microservice project in the preset skeleton according to the target template coordinates of the target microservice project. The creation unit 103 is configured to create the target microservice project according to the target template tool class package.
[0089] In one embodiment, the creation unit 103 is further configured to pre-create a preset skeleton in the following manner: converge all template tool class packages for creating a microservice project, introduce the source project parent POM for each template tool category in all the template tool class packages, and create a skeleton source project with unified dependencies. Publish the skeleton source project to a preset microservice project platform.
[0090] In one embodiment, the creation unit 103 introduces each template tool category in all the template tool class packages into the source project parent POM in the following manner to create a skeleton source project with unified dependencies: abstract the source project structure for alignment and layering to obtain a service aggregation layer and a basic service layer. Introduce the service aggregation layer and the basic service layer into the source project parent POM file respectively. Set the type tag of the introduced source project parent POM file to POM to converge the dependencies of the services in the service aggregation layer and the basic service layer, and create a skeleton source project with unified dependencies.
[0091] In one embodiment, the creation unit 103 is further configured to: in response to determining to update the skeleton source project, add a preset skeleton coordinate in an integrated development environment. Create a new project and select the preset skeleton coordinate. Match the preset skeleton coordinate to the service aggregation layer and the basic service layer respectively to obtain an updated skeleton source project.
[0092] In one embodiment, the creation unit 103 publishes the skeleton source project to a preset microservice project platform in the following manner: publish the skeleton source project to a private microservice project platform. And / or publish the skeleton source project to a public microservice project platform.
[0093] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.
[0094] Figure 8 It is a block diagram of a device 200 for microservice project deployment shown according to an exemplary embodiment. For example, the device 200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0095] Refer to Figure 8 , the device 200 may include one or more of the following components: a processing component 202, a memory 204, a power component 206, a multimedia component 208, an audio component 210, an input / output (I / O) interface 212, a sensor component 214, and a communication component 216.
[0096] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to complete all or part of the steps of the above-described methods. In addition, the processing component 202 may include one or more modules to facilitate the interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate the interaction between the multimedia component 208 and the processing component 202.
[0097] The memory 204 is configured to store various types of data to support the operation of the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disks, or optical disks.
[0098] The power component 206 provides power to the various components of the device 200. The power component 206 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 200.
[0099] The multimedia component 208 includes a screen that provides an output interface between the device 200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can not only sense the boundaries of touch or swipe actions, but also detect the duration and pressure associated with the touch or swipe operations. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
[0100] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC) that is configured to receive external audio signals when the device 200 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 204 or transmitted via the communication component 216. In some embodiments, the audio component 210 further includes a speaker for outputting audio signals.
[0101] The I / O interface 212 provides an interface between the processing component 202 and a peripheral interface module, and the peripheral interface module may be a keyboard, a click wheel, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
[0102] The sensor component 214 includes one or more sensors for providing an assessment of various aspects of the status of the device 200. For example, the sensor component 214 can detect the on / off state of the device 200, the relative positioning of components, such as the display and keypad of the device 200. The sensor component 214 can also detect a change in the position of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration / deceleration of the device 200, and a change in the temperature of the device 200. The sensor component 214 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 214 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 214 may further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0103] The communication component 216 is configured to facilitate communication between the device 200 and other devices in a wired or wireless manner. The device 200 can access a wireless network based on communication standards, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0104] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.
[0105] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as the memory 204 including instructions, and the above instructions can be executed by the processor 220 of the apparatus 200 to complete the above method. For example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0106] Figure 9 FIG. is a block diagram of an apparatus 300 for a microservice deployment project according to an exemplary embodiment. For example, the apparatus 300 may be provided as a server. Referring to Figure 9 , the apparatus 300 includes a processing component 322, which further includes one or more processors, and memory resources represented by a memory 332 for storing instructions executable by the processing component 322, such as application programs. The application programs stored in the memory 332 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 322 is configured to execute instructions to perform the above method.
[0107] The apparatus 300 may also include a power component 326 configured to perform power management of the apparatus 300, a wired or wireless network interface 350 configured to connect the apparatus 300 to a network, and an input / output (I / O) interface 358. The apparatus 300 may operate based on an operating system stored in the memory 332, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
[0108] It can be understood that "a plurality of" in the present disclosure means two or more, and other quantifiers are similar. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after. The singular forms of "a", "the", and "said" are also intended to include the plural forms unless the context clearly indicates otherwise.
[0109] It can be further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other, and do not represent a specific order or degree of importance. In fact, expressions such as "first" and "second" can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.
[0110] It can be further understood that unless otherwise specified, "connection" includes direct connection without other components between the two, and also includes indirect connection with other elements between the two.
[0111] It can be further understood that although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be construed as requiring these operations to be performed in the specific order or serial order shown, or requiring all the operations shown to obtain the desired result. In certain environments, multitasking and parallel processing may be advantageous.
[0112] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common general knowledge or conventional technical means in the technical field not disclosed by the present disclosure.
[0113] It should be understood that the present disclosure is not limited to the exact structures already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A microservice project deployment method, characterized in that, Including: In response to determining to deploy a target microservice project, obtain a preset skeleton, where the preset skeleton includes all template tool class packages for creating a microservice project, and all the template tool class packages have template coordinates that have been matched; Match the target template tool class package of the target microservice project in the preset skeleton according to the target template coordinates of the target microservice project; Create the target microservice project according to the target template tool class package.
2. The method according to claim 1, wherein The preset skeleton is pre-created in the following manner: Converge all template tool class packages for creating a microservice project, and introduce a source project parent project object model (POM) for each template tool category in all the template tool class packages to create a skeleton source project with unified dependencies; Publish the skeleton source project to a preset microservice project platform.
3. The method according to claim 2, wherein The step of introducing a source project parent POM for each template tool category in all the template tool class packages to create a skeleton source project with unified dependencies includes: Abstract the source project structure for alignment and layering to obtain a service aggregation layer and a basic service layer; Introduce the service aggregation layer and the basic service layer into the source project parent POM file respectively; Set the type label of the introduced source project parent POM file to POM to converge the dependencies of the service aggregation layer and the basic service layer services, and create a skeleton source project with unified dependencies.
4. The method according to claim 2 or 3, characterized in that, The method further includes: In response to determining to update the skeleton source project, add preset skeleton coordinates in an integrated development environment; Create a new project and select the preset skeleton coordinates; Match the preset skeleton coordinates to the service aggregation layer and the basic service layer respectively to obtain an updated skeleton source project.
5. The method according to claim 2, characterized in that, The step of publishing the skeleton source project to a preset microservice project platform includes: Publish the skeleton source project to a private microservice project platform; and / or Publish the skeleton source project to a public microservice project platform.
6. A microservice project deployment device, characterized in that, The apparatus includes: An acquisition unit, configured to obtain a preset skeleton when it is determined to deploy a target microservice project, where the preset skeleton includes all template tool class packages for creating a microservice project, and all the template tool class packages have template coordinates that have been matched; A matching unit, configured to match the target template tool class package of the target microservice project in the preset skeleton according to the target template coordinates of the target microservice project; A creation unit, configured to create the target microservice project according to the target template tool class package.
7. The device according to claim 6, characterized in that, The creation unit is further configured to pre-create the preset skeleton in the following manner: Converge all template tool class packages for creating a microservice project, and introduce a source project parent POM for each template tool category in all the template tool class packages to create a skeleton source project with unified dependencies; Publish the skeleton source project to a preset microservice project platform.
8. The device according to claim 7, characterized in that, The creation unit introduces a source project parent POM for each template tool category in all the template tool class packages in the following manner to create a skeleton source project with unified dependencies: Abstract the source project structure for alignment and layering to obtain a service aggregation layer and a basic service layer; Introduce the service aggregation layer and the basic service layer into the parent POM file of the source project respectively; Set the type tag of the introduced parent POM file of the source project to POM to converge the dependencies of the services in the service aggregation layer and the basic service layer, and create a skeleton source project with unified dependencies.
9. The device according to claim 7 or 8, characterized in that, The creating unit is further configured to: In response to determining to update the skeleton source project, add preset skeleton coordinates in the integrated development environment; Create a new project and select the preset skeleton coordinates; Match the preset skeleton coordinates to the service aggregation layer and the basic service layer respectively to obtain the updated skeleton source project.
10. The device according to claim 7, characterized in that, The creating unit publishes the skeleton source project to a preset microservice project platform in the following manner: Publish the skeleton source project to a private microservice project platform; and / or Publish the skeleton source project to a public microservice project platform.
11. A microservice project deployment device, characterized in that, Comprising: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to: call the instructions stored in the memory to execute the microservice project deployment method according to any one of claims 1-5.
12. A storage medium, characterized in that, When the instructions in the storage medium are executed by the processor, the microservice project deployment method according to any one of claims 1-5 can be executed.