CN112506487A - Micro-service development method and device - Google Patents

Micro-service development method and device Download PDF

Info

Publication number
CN112506487A
CN112506487A CN202011487625.7A CN202011487625A CN112506487A CN 112506487 A CN112506487 A CN 112506487A CN 202011487625 A CN202011487625 A CN 202011487625A CN 112506487 A CN112506487 A CN 112506487A
Authority
CN
China
Prior art keywords
cloud
component
micro
information
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011487625.7A
Other languages
Chinese (zh)
Inventor
王孟强
王琰洁
刘歆一
刘迪
刘泽三
张晶
陈刚
刘雅琦
郑瀚潇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Information and Telecommunication Co Ltd
Original Assignee
State Grid Information and Telecommunication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Information and Telecommunication Co Ltd filed Critical State Grid Information and Telecommunication Co Ltd
Priority to CN202011487625.7A priority Critical patent/CN112506487A/en
Publication of CN112506487A publication Critical patent/CN112506487A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a micro-service development method which comprises the steps of calling label information of a cloud-up component and a mapping relation between the cloud-up component and a micro-service basic framework when micro-service development is carried out, screening label information of the cloud-up component having a mapping relation with the micro-service basic framework after the micro-service basic framework used for micro-service development is determined, directly selecting a target cloud-up component from the label information of the cloud-up component having a mapping relation with the micro-service basic framework, calling content information of the target cloud-up component through the selected label information of the target cloud-up component, and generating first dependency information required by cloud-up according to the content information of the target cloud-up component. Therefore, when the micro-service is subjected to cloud-going operation, a user does not need to manually inquire the cloud environment and each basic component supported by the micro-service basic framework, the workload is reduced, and the development efficiency is greatly improved.

Description

Micro-service development method and device
Technical Field
The invention relates to the field of software development, in particular to a micro-service development method and device.
Background
With the deep development of cloud computing and cloud service technologies, the 'application cloud' becomes an important measure for enterprise digital transformation. The cloud application of the micro-service architecture can effectively reduce the complexity of micro-service management, operation and maintenance, so that the cloud requirement of the micro-service is more and more urgent. In order to meet the cloud requirement, before the micro service is developed, an applicable cloud platform needs to be selected according to the self requirement.
In order to meet the cloud requirement in the micro-service development process, a suitable cloud environment component and other related components need to be selected, however, the number of cloud environment components in the market is large, and a user needs to select the supported cloud environment and related components during the micro-service development. In addition, during micro-service development, a micro-service basic framework is required to be adopted for micro-service development, and cloud environments supported by different micro-service basic frameworks or versions of different micro-service basic frameworks are different, so that a user is required to inquire the supported cloud environment before micro-service development is carried out, and development efficiency is greatly influenced.
Disclosure of Invention
In view of this, the embodiment of the present invention discloses a micro-service development method, so that when a micro-service is developed, a user does not need to query a cloud environment supported by a micro-service infrastructure and a relationship between each component, thereby improving development efficiency.
The embodiment of the invention discloses a micro-service development method, which is applied to a client and comprises the following steps:
responding to a micro-service parent project creating instruction, and calling label information of the upper cloud component and a mapping relation between the upper cloud component and a micro-service basic framework; the cloud-up component comprises a cloud environment component and a basic component required by micro-service cloud-up;
determining a micro-service basic framework for creating micro-services, and screening out tag information of cloud-going components having a mapping relation with the micro-service basic framework;
receiving label information of a cloud component on a target; the label information of the cloud component on the target is selected from the label information of the cloud component having a mapping relation with the micro-service basic framework;
calling content information of a target cloud component related to label information of the target cloud component, and generating first dependency information required by cloud-up according to the content information of the target cloud component;
creating a micro-service engineering structure and adding the first dependency information to the micro-service engineering structure.
Optionally, the retrieving content information of the target cloud component related to the tag information of the target cloud component includes:
calling pre-stored content information of all cloud-up components;
and acquiring the content information of the target on-cloud component related to the label information of the target on-cloud component from the content information of all on-cloud components.
Optionally, the method further includes:
responding to a micro-service child project creating instruction, and receiving identification information of a parent project corresponding to the child project;
establishing a dependency relationship between the parent item and the child item according to the identification information of the parent item, so that the child item can use a dependent file required by the cloud on the parent item;
and creating an engineering structure of the micro-service sub-project.
Optionally, the method further includes:
receiving label information of a basic component in the upper cloud component;
acquiring content information of a basic assembly according to label information of the basic assembly in the upper cloud assembly;
generating second dependent information according to the content information of the basic component;
adding the second dependency information to the project file of the sub project.
Optionally, the method further includes:
responding to an instruction of switching a cloud environment, and acquiring tag information of an upper cloud component to be switched;
acquiring content information of the upper cloud component related to the label information of the upper cloud component;
generating a second dependent file required by cloud uploading through the content information of the cloud uploading component to be switched;
and replacing the first dependency information in the micro-service engineering structure with the second dependency file.
The embodiment of the invention also discloses a micro-service development device, which is applied to the client and comprises:
the first calling unit is used for calling the label information of the upper cloud component and the mapping relation between the upper cloud component and the micro-service basic framework in response to the micro-service parent project creating instruction; the cloud-up component comprises a cloud environment component and a basic component required by micro-service cloud-up;
the screening unit is used for determining a micro-service basic framework for creating micro-services and screening out the label information of the cloud-going component having a mapping relation with the micro-service basic framework;
the first receiving unit is used for receiving label information of the cloud component on the target; the label information of the cloud component on the target is selected from the label information of the cloud component having a mapping relation with the micro-service basic framework;
the second calling unit is used for calling content information of the target cloud component related to the label information of the target cloud component, and generating first dependency information required by cloud-up according to the content information of the target cloud component;
and the first creating unit is used for creating a micro-service engineering structure and adding the first dependency information into the micro-service engineering structure.
Optionally, the second retrieving unit includes:
the first calling subunit is used for calling the pre-stored content information of all the cloud-up components;
the first obtaining subunit is configured to obtain, from the content information of all the upper cloud components, content information of a target upper cloud component related to the tag information of the target upper cloud component.
Optionally, the method further includes:
the second receiving unit is used for responding to a micro-service sub-item creating instruction and receiving the identification information of a parent item corresponding to the sub-item;
the dependency relationship establishing unit is used for establishing the dependency relationship between the parent item and the child item according to the identification information of the parent item, so that the child item can use a dependency file required by the cloud on the parent item;
and the second creating unit is used for creating the engineering structure of the micro-service sub-project.
Optionally, the method further includes:
the third receiving unit is used for receiving label information of the basic component in the upper cloud component;
the second acquiring subunit is used for acquiring the content information of the basic component according to the label information of the basic component in the upper cloud component;
a first generating unit, configured to generate second dependency information according to the content information of the base component;
and the first adding unit is used for adding the second dependency information into the project files of the sub projects.
Optionally, the method further includes:
the third acquisition unit is used for responding to the instruction of switching the cloud environment and acquiring the label information of the upper cloud component to be switched;
a fourth obtaining unit, configured to obtain content information of the upper cloud component related to the tag information of the upper cloud component;
the second generation unit is used for generating a second dependent file required by cloud uploading through the content information of the cloud uploading component needing to be switched;
and the second adding unit is used for replacing the first dependency information in the micro-service engineering structure with the second dependency file.
The embodiment of the invention also discloses a micro-service development system, which comprises:
the system comprises a client, a server and a cloud component library;
the client is used for executing the method of claims 1-5;
the server is used for providing an interface for the client so that the client can call the label information of the upper cloud component, the mapping relation between the upper cloud component and the micro-service basic framework and the content information of the upper cloud component;
the cloud component library stores pre-stored tag information of the upper cloud component and a mapping relation between the upper cloud component and the micro-service basic framework in advance.
The embodiment discloses a micro-service development method, which comprises the following steps: when micro-service development is carried out, label information of a cloud-up component and a mapping relation between the cloud-up component and a micro-service basic framework are taken, so that after the micro-service basic framework for micro-service development is determined, label information of the cloud-up component having a mapping relation with the micro-service basic framework can be screened out, a target cloud-up component can be directly selected from the label information of the cloud-up component having a mapping relation with the micro-service basic framework, content information of the target cloud-up component is taken through the selected label information of the target cloud-up component, and first dependency information required by cloud-up is generated according to the content information of the target cloud-up component. Therefore, when the micro-service is subjected to cloud-going operation, a user does not need to manually inquire the cloud environment and each basic component supported by the micro-service basic framework, the workload is reduced, and the development efficiency is greatly improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating a method for developing a microservice according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a microservice development method provided by an embodiment of the present invention;
fig. 3 is a schematic flow chart of a microservice development method provided by an embodiment of the present invention;
FIG. 4 is a schematic flow chart of a microservice development method according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of a microservice development method provided by an embodiment of the present invention;
fig. 6 is a schematic structural diagram illustrating a microservice developing apparatus according to an embodiment of the present invention;
fig. 7 shows a schematic structural diagram of a microservice development system, which is further disclosed in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of a method for developing a micro service provided in an embodiment of the present invention is shown, where in this embodiment, the method is applied to a terminal, and the method includes:
s101: responding to a micro-service parent project creating instruction, and calling label information of the upper cloud component and a mapping relation between the upper cloud component and a micro-service basic framework; the cloud-up component comprises a cloud environment component and a basic component required by micro-service cloud-up;
in this embodiment, the tag information of the upper cloud component is information for describing the representation of the upper cloud component, and the tag information is used for displaying on the terminal. Wherein the tag information includes: name, identification, description and the like, and the information is used for displaying at the client for the user to select.
And the mapping relation between the upper cloud component and the micro-service basic framework is the relation established between the micro-service basic framework and the upper cloud component supporting the micro-service basic framework. Under the condition that it is known which micro-service basic framework is adopted for micro-service development, the cloud-up component supporting the micro-service basic framework can be screened out through the mapping relation between the cloud-up component and the micro-service basic framework.
In this embodiment, the upper cloud component includes a cloud environment component and a base component, where the base component includes: industry components and general purpose components.
S102: determining a micro-service basic framework for creating micro-services, and screening out tag information of cloud-going components having a mapping relation with the micro-service basic framework;
it should be noted that the micro-service infrastructure on the market includes many, and a micro-service infrastructure also includes many different versions.
In this embodiment, the micro service basic framework referred to in S102 may be any micro service basic framework, or may be a version of any micro service basic framework.
For example, referring to FIG. 2, a user may select any one of the versions of Spring Boot Version, such as Version 2.1.3 of Spring Boot Version.
Preferably, in order to improve the stability of the micro service depending on the cloud environment, the micro service basic framework supported by the cloud environment is screened in advance, so that the micro service basic framework selected by the user can support the cloud environment and can stably operate.
S103: receiving label information of a cloud component on a target; the label information of the cloud component on the target is selected from the label information of the cloud component having a mapping relation with the micro-service basic framework;
in this embodiment, after the user selects the micro service infrastructure for creating the micro service on the client, based on the mapping relationship between the cloud component and the micro service infrastructure, the tag information of the cloud component having the mapping relationship with the micro service infrastructure can be automatically screened out, and the screened out tag information of the cloud component supporting the micro service infrastructure is all the tag information of the cloud component. Therefore, a user does not need to inquire which cloud environment components and the basic components support the micro-service basic framework, and the workload is greatly reduced.
In addition, the screened tag information of the cloud-up component supporting the micro-service basic framework can be displayed on the terminal, so that the user can screen the tag information of the cloud-up component displayed on the terminal according to the requirement.
S104: calling content information of a target cloud component related to label information of the target cloud component, and generating first dependency information required by cloud-up according to the content information of the target cloud component;
in this embodiment, the content information of the cloud component on the target may be understood as related information for generating the dependent file, and includes, for example: name, coordinates, and component description of the component, etc.
In this embodiment, the method for creating the micro service is executed at the client, and in order to further reduce the interaction between the client and other terminals, content information of all the cloud-up components may be called in advance, so that after the cloud-up component selected by the user is determined, relevant information of the component may be directly called from the client.
And the related information of the upper cloud component is stored in the cloud component library, the client needs to interact with the cloud component library through the network, and if the content information of the upper cloud component is called from the cloud component library in advance, the content information of the upper cloud component can be quickly acquired even under the condition of poor network.
Particularly, when other sub-projects related to the parent project are created, interaction with other devices is not needed, the content information of the cloud-up component stored in the terminal can be directly used, and the micro-service sub-project creation efficiency is improved.
Thus, in the above case, S104 includes:
calling pre-stored content information of all cloud-up components;
and acquiring the content information of the target on-cloud component related to the label information of the target on-cloud component from the content information of all on-cloud components.
Besides, after the tag information of the upper cloud component is acquired, the content information of the upper cloud component related to the tag information of the upper cloud component can be called from the cloud component library.
S105: and generating a micro-service engineering structure, and adding the first dependency information into a dependency file of the micro-service engineering structure.
In this embodiment, the micro-service engineering structure includes all files supporting the micro-service application, such as source code information for operating the micro-service software and dependent files of the micro-service.
In this embodiment, in order to enable the micro service to meet the cloud requirement, the generated first dependency information on which the micro service depends is added to the dependency file of the micro service engineering structure.
The dependency file of the engineering structure comprises all components supporting engineering operation of the micro service, and the first dependency information comprises all components required by the cloud.
In this embodiment, when micro-service development is performed, tag information of a cloud-up component and a mapping relationship between the cloud-up component and a micro-service basic framework are retrieved, after the micro-service basic framework for micro-service development is determined, tag information of the cloud-up component having a mapping relationship with the micro-service basic framework can be screened out, so that a target cloud-up component can be directly selected from the tag information of the cloud-up component having a mapping relationship with the micro-service basic framework, content information of the target cloud-up component is retrieved according to the selected tag information of the target cloud-up component, and first dependency information required for cloud-up is generated according to the content information of the target cloud-up component. Therefore, when the micro-service is subjected to cloud-going operation, a user does not need to manually inquire the cloud environment and each basic component supported by the micro-service basic framework, the workload is reduced, and the development efficiency is greatly improved.
Referring to fig. 3, a schematic flow chart of a microservice development method provided in an embodiment of the present invention is shown, in the embodiment, the method includes:
s301, responding to a micro-service sub-project creating instruction, and receiving identification information of a parent project corresponding to the sub-project;
in this embodiment, the identification information of the parent item may be any information for characterizing the parent item, for example, a name of the parent item.
When creating a child item, a user may input identification information of a parent item corresponding to the child item.
S302: establishing a dependency relationship between the parent item and the child item according to the identification information of the parent item, so that the child item can use a dependent file required by the cloud on the parent item;
in this embodiment, the method for establishing the dependency relationship between the parent item and the child item includes multiple methods, which are not limited in this embodiment, and for example, a dependency management tool Maven may be used to implement the dependency between the parent item and the child item.
In this embodiment, a dependency relationship between a child item and a parent item is established, so that the child item can call a dependent file required by a cloud on the parent item.
The dependency file comprises components required by engineering operation, such as cloud environment components and basic components.
S303: and creating an engineering structure of the micro-service sub-project.
In this embodiment, the micro-service engineering structure includes all files supporting the micro-service application, such as source code information and dependent files for operating the micro-service software.
In the embodiment, when creating the child project of the micro service, the child project can use the dependent file required by the cloud of the parent project only by establishing the dependency relationship between the parent project and the project of the micro service, so that the cloud requirement of the child project is realized. Therefore, the sub-project does not need to select a cloud environment component additionally, the cloud-accessing requirement is realized, the cloud-accessing process of the sub-project is simplified, and the micro-service creating efficiency is improved.
Referring to fig. 4, another schematic flow chart of a microservice development method provided in an embodiment of the present invention is shown, in this embodiment, the method includes:
s401: responding to a micro-service child project creating instruction, and receiving identification information of a parent project corresponding to the child project;
s402: establishing a dependency relationship between the parent item and the child item according to the identification information of the parent item, so that the child item can use a dependent file required by the cloud on the parent item;
s403: receiving label information of a basic component in the upper cloud component;
in this embodiment, in the process of creating a child item, the cloud environment of the child item may depend on the parent item, that is, when creating the child item, no environment component needs to be selected, but other basic components may be needed, and then, when a user needs a basic component, a required component may be selected and a dependency may be generated.
In this embodiment, the tag information of the basic component may be understood as related information for characterizing the basic component, and the tag information may include: name, identification, description and other information, which are used for displaying at the client and for the user to select.
S404: acquiring content information of the basic component according to the label information of the basic component;
the content information of the base component may be understood as related information for generating the dependent file, including, for example: name, coordinates, and component description of the underlying component, etc.
The acquisition of the content information of the basic component can include two embodiments as follows:
in the first implementation mode, content information corresponding to the label information of the basic component is called from a cloud component library through a server side;
and in the second implementation mode, the content information of the basic component is acquired from the content information of the upper cloud component stored in advance by the client.
S405: generating second dependent information according to the content information of the basic component;
s406: and creating an engineering file of the sub project, and adding the second dependency information into a dependency file of an engineering structure of the sub project.
In the embodiment, when creating the child project of the micro service, the child project can use the dependent file required by the cloud of the parent project only by establishing the dependency relationship between the parent project and the project of the micro service, so that the cloud requirement of the child project is realized. Therefore, the sub-project does not need to select a cloud environment component additionally, the cloud-accessing requirement is realized, the cloud-accessing process of the sub-project is simplified, and the micro-service creating efficiency is improved. In addition, other basic components can be added according to requirements when the sub-projects are created, and therefore convenience is provided for micro-service development.
After the cloud requirement of the micro service is completed, the user may want to support the cloud requirement of the micro service by using another cloud environment, in the prior art, if the cloud environment is switched, a large amount of information needs to be modified, the workload is large, and particularly under the condition that a parent project and a child project are included, both the parent project and the child project need to be modified, and the workload of modification is large.
In order to solve the above problem, referring to fig. 5, a schematic flow chart of a microservice development method provided by an embodiment of the present invention is shown, in the embodiment, the method includes:
s501: responding to an instruction of switching a cloud environment, and acquiring tag information of an upper cloud component to be switched;
in this embodiment, when the user needs to change the cloud environment for the micro service on which the upper cloud is generated, the user may reselect the tag information of the upper cloud component.
When receiving an instruction of switching cloud environment, a client acquires tag information of a cloud-up component selected by a user, wherein the cloud-up component comprises a cloud environment component which the user wants to switch.
S502: acquiring content information of the cloud component related to the label information of the cloud component to be switched;
in this embodiment, the obtaining of the content information of the upper cloud component may include two implementation manners as follows:
the method comprises the steps that firstly, content information of a cloud component is called from a cloud component library based on label information of the cloud component;
and secondly, acquiring content information of the cloud-up component related to the label information of the cloud-up component from the content information of the cloud-up component pre-stored by the client.
S503: generating third dependency information required by cloud uploading through the content information of the cloud uploading component to be switched;
s504: and replacing the first dependency information in the engineering structure of the micro-service parent project with the third dependency information.
In this embodiment, when the micro service needs to perform cloud environment switching, after new dependency information required for cloud environment switching is generated, the new dependency information required for cloud environment switching is replaced with the original dependency information required for cloud environment switching in the engineering structure of the micro service parent project, so that switching of the micro service cloud environment is achieved, and in the case that the parent project contains a child project, because a dependency relationship exists between the parent project and the child project, the child project can directly call a dependency file of the parent project after the parent project switches the cloud environment, so that switching of the cloud environment of the child environment is achieved.
In this embodiment, the cloud component is reselected according to a user requirement, third dependency information required by cloud installation is generated based on the reselected cloud component, and the third dependency information replaces the first dependency information in the engineering structure of the micro-service parent project. Therefore, when the micro-service is developed, the purpose of automatically switching the cloud environment of the developed micro-service is realized, the switching process of the cloud environment is simplified, and the switching efficiency of the cloud environment is improved.
Referring to fig. 6, a schematic structural diagram of a microservice development apparatus provided in an embodiment of the present invention is shown, where the apparatus is applied to a client, and the apparatus includes:
a first retrieving unit 601, configured to retrieve, in response to a micro-service parent item creation instruction, tag information of a cloud component and a mapping relationship between the cloud component and a micro-service infrastructure; the cloud-up component comprises a cloud environment component and a basic component required by micro-service cloud-up;
a screening unit 602, configured to determine a micro service basic framework for creating a micro service, and screen out tag information of a cloud component having a mapping relationship with the micro service basic framework;
a first receiving unit 603, configured to receive tag information of a cloud component on a target; the label information of the cloud component on the target is selected from the label information of the cloud component having a mapping relation with the micro-service basic framework;
a second retrieving unit 604, configured to retrieve content information of a target cloud component related to tag information of the target cloud component, and generate first dependency information required for going to the cloud according to the content information of the target cloud component;
the first creating unit 605 is configured to create a micro-service engineering structure, and add the first dependency information to a dependency file of the micro-service engineering structure.
Optionally, the second retrieving unit includes:
the first calling subunit is used for calling the pre-stored content information of all the cloud-up components;
the first obtaining subunit is configured to obtain, from the content information of all the upper cloud components, content information of a target upper cloud component related to the tag information of the target upper cloud component.
Optionally, the method further includes:
the second receiving unit is used for responding to a micro-service sub-item creating instruction and receiving the identification information of a parent item corresponding to the sub-item;
the dependency relationship establishing unit is used for establishing the dependency relationship between the parent item and the child item according to the identification information of the parent item, so that the child item can use a dependency file required by the cloud on the parent item;
and the second creating unit is used for creating the engineering structure of the micro-service sub-project.
Optionally, the method further includes:
the third receiving unit is used for receiving label information of the basic component in the upper cloud component;
the second acquiring subunit is used for acquiring the content information of the basic component according to the label information of the basic component in the upper cloud component;
a first generating unit, configured to generate second dependency information according to the content information of the base component;
a first adding unit, configured to add the second dependency information to a dependency file of the engineering structure of the sub-item.
Optionally, the method further includes:
the third acquisition unit is used for responding to the instruction of switching the cloud environment and acquiring the label information of the upper cloud component to be switched;
a fourth obtaining unit, configured to obtain content information of the upper cloud component related to the tag information of the upper cloud component;
the second generation unit is used for generating third dependency information required by cloud uploading through the content information of the cloud uploading component needing to be switched;
and the second adding unit is used for replacing the third dependency information with the first dependency information in the micro-service engineering structure.
By the device, when micro-service development is carried out, label information of the upper cloud component and the mapping relation between the upper cloud component and the micro-service basic framework are retrieved, so that after the micro-service basic framework for micro-service development is determined, label information of the upper cloud component having the mapping relation with the micro-service basic framework can be screened out, a target upper cloud component can be directly selected from the label information of the upper cloud component having the mapping relation with the micro-service basic framework, content information of the target upper cloud component is retrieved through the selected label information of the target upper cloud component, and first dependency information required by cloud formation is generated according to the content information of the target upper cloud component. Therefore, when the micro-service is subjected to cloud-going operation, a user does not need to manually inquire the cloud environment and each basic component supported by the micro-service basic framework, the workload is reduced, and the development efficiency is greatly improved.
Referring to fig. 7, a schematic structural diagram of a microservice development system according to an embodiment of the present invention is shown, where in this embodiment, the microservice development system includes:
a client 701, a server 702 and a cloud component library 703;
the client is configured to execute the micro-service development method, and specifically includes:
responding to a micro-service parent project creating instruction, and calling label information of the upper cloud component and a mapping relation between the upper cloud component and a micro-service basic framework; the cloud-up component comprises a cloud environment component and a basic component required by micro-service cloud-up;
determining a micro-service basic framework for creating micro-services, and screening out tag information of cloud-going components having a mapping relation with the micro-service basic framework;
receiving label information of a cloud component on a target; the label information of the cloud component on the target is selected from the label information of the cloud component having a mapping relation with the micro-service basic framework;
calling content information of a target cloud component related to label information of the target cloud component, and generating first dependency information required by cloud-up according to the content information of the target cloud component;
and creating a micro-service engineering structure, and adding the first dependency information into a dependency file of the micro-service engineering structure.
Optionally, the retrieving content information of the target cloud component related to the tag information of the target cloud component includes:
calling pre-stored content information of all cloud-up components;
and acquiring the content information of the target on-cloud component related to the label information of the target on-cloud component from the content information of all on-cloud components.
Optionally, the method further includes:
responding to a micro-service child project creating instruction, and receiving identification information of a parent project corresponding to the child project;
establishing a dependency relationship between the parent item and the child item according to the identification information of the parent item, so that the child item can use a dependent file required by the cloud on the parent item;
and creating an engineering structure of the micro-service sub-project.
Optionally, the method further includes:
receiving label information of a basic component in the upper cloud component;
acquiring content information of a basic assembly according to label information of the basic assembly in the upper cloud assembly;
generating second dependent information according to the content information of the basic component;
adding the second dependency information to a dependency file of the engineering structure of the sub-project.
Optionally, the method further includes:
responding to an instruction of switching a cloud environment, and acquiring tag information of an upper cloud component to be switched;
acquiring content information of the upper cloud component related to the label information of the upper cloud component;
generating third dependency information required by cloud uploading through the content information of the cloud uploading component to be switched;
replacing the first dependency information in the micro-service engineering structure with the third dependency information.
The server is used for providing an interface for the client so that the client can call the label information of the upper cloud component, the mapping relation between the upper cloud component and the micro-service basic framework and the content information of the upper cloud component;
the cloud component library stores pre-stored tag information of the upper cloud component and a mapping relation between the upper cloud component and the micro-service basic framework in advance.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. A microservice development method, applied to a client, the method comprising:
responding to a micro-service parent project creating instruction, and calling label information of the upper cloud component and a mapping relation between the upper cloud component and a micro-service basic framework; the cloud-up component comprises a cloud environment component and a basic component required by micro-service cloud-up;
determining a micro-service basic framework for creating micro-services, and screening out tag information of cloud-up components having a mapping relation with the micro-service basic framework;
receiving label information of a cloud component on a target; the label information of the cloud component on the target is selected from the label information of the cloud component having a mapping relation with the micro-service basic framework;
calling content information of a target cloud component related to label information of the target cloud component, and generating first dependency information required by cloud-up according to the content information of the target cloud component;
and creating a micro-service engineering structure, and adding the first dependency information into a dependency file of the micro-service engineering structure.
2. The method of claim 1, wherein the retrieving content information of the target on-target cloud component related to the tag information of the target on-target cloud component comprises:
calling pre-stored content information of all cloud-up components;
and acquiring the content information of the target on-cloud component related to the label information of the target on-cloud component from the content information of all on-cloud components.
3. The method of claim 1, further comprising:
responding to a micro-service child project creating instruction, and receiving identification information of a parent project corresponding to the child project;
establishing a dependency relationship between the parent item and the child item according to the identification information of the parent item, so that the child item can use a dependent file required by the cloud on the parent item;
and creating an engineering structure of the micro-service sub-project.
4. The method of claim 3, further comprising:
receiving label information of a basic component in the upper cloud component;
acquiring content information of a basic assembly according to label information of the basic assembly in the upper cloud assembly;
generating second dependent information according to the content information of the basic component;
and adding the second dependency information to a dependency file of the engineering structure of the sub-project.
5. The method of claim 1, further comprising:
responding to an instruction of switching a cloud environment, and acquiring tag information of an upper cloud component to be switched;
acquiring content information of the cloud component related to the label information of the cloud component to be switched;
generating third dependency information required by cloud uploading through the content information of the cloud uploading component to be switched;
replacing the first dependency information in the micro-service engineering structure with the third dependency information.
6. A microservice development device, the device being applied to a client, the device comprising:
the first calling unit is used for calling the label information of the upper cloud component and the mapping relation between the upper cloud component and the micro-service basic framework in response to the micro-service parent project creating instruction; the cloud-up component comprises a cloud environment component and a basic component required by micro-service cloud-up;
the screening unit is used for determining a micro-service basic framework for creating micro-services and screening out the label information of the cloud-going component having a mapping relation with the micro-service basic framework;
the first receiving unit is used for receiving label information of the cloud component on the target; the label information of the cloud component on the target is selected from the label information of the cloud component having a mapping relation with the micro-service basic framework;
the second calling unit is used for calling content information of the target cloud component related to the label information of the target cloud component, and generating first dependency information required by cloud-up according to the content information of the target cloud component;
and the first creating unit is used for creating a micro-service engineering structure and adding the first dependency information into a dependency file of the micro-service engineering structure.
7. The apparatus of claim 6, wherein the second retrieving unit comprises:
the first calling subunit is used for calling the pre-stored content information of all the cloud-up components;
the first obtaining subunit is configured to obtain, from the content information of all the upper cloud components, content information of a target upper cloud component related to the tag information of the target upper cloud component.
8. The apparatus of claim 6, further comprising:
the second receiving unit is used for responding to a micro-service sub-item creating instruction and receiving the identification information of a parent item corresponding to the sub-item;
the dependency relationship establishing unit is used for establishing the dependency relationship between the parent item and the child item according to the identification information of the parent item, so that the child item can use a dependency file required by the cloud on the parent item;
and the second creating unit is used for creating the engineering structure of the micro-service sub-project.
9. The apparatus of claim 8, further comprising:
the third receiving unit is used for receiving label information of the basic component in the upper cloud component;
the second acquiring subunit is used for acquiring the content information of the basic component according to the label information of the basic component in the upper cloud component;
a first generating unit, configured to generate second dependency information according to the content information of the base component;
a first adding unit, configured to add the second dependency information to a dependency file of the engineering structure of the sub-item.
10. The apparatus of claim 6, further comprising:
the third acquisition unit is used for responding to the instruction of switching the cloud environment and acquiring the label information of the upper cloud component to be switched;
a fourth obtaining unit, configured to obtain content information of the upper cloud component related to the tag information of the upper cloud component;
the second generation unit is used for generating third dependency information required by cloud uploading through the content information of the cloud uploading component needing to be switched;
and the second adding unit is used for replacing the third dependency information with the first dependency information in the micro-service engineering structure.
11. A microservice development system, comprising:
the system comprises a client, a server and a cloud component library;
the client is used for executing the method of any one of claims 1 to 5;
the server is used for providing an interface for the client so that the client can call the label information of the upper cloud component, the mapping relation between the upper cloud component and the micro-service basic framework and the content information of the upper cloud component;
the cloud component library stores pre-stored tag information of the upper cloud component and a mapping relation between the upper cloud component and the micro-service basic framework in advance.
CN202011487625.7A 2020-12-16 2020-12-16 Micro-service development method and device Pending CN112506487A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011487625.7A CN112506487A (en) 2020-12-16 2020-12-16 Micro-service development method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011487625.7A CN112506487A (en) 2020-12-16 2020-12-16 Micro-service development method and device

Publications (1)

Publication Number Publication Date
CN112506487A true CN112506487A (en) 2021-03-16

Family

ID=74972624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011487625.7A Pending CN112506487A (en) 2020-12-16 2020-12-16 Micro-service development method and device

Country Status (1)

Country Link
CN (1) CN112506487A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115756450A (en) * 2022-12-05 2023-03-07 广州玖晔网络科技有限公司 Micro-service development method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105162884A (en) * 2015-09-25 2015-12-16 浪潮(北京)电子信息产业有限公司 Cloud management platform based on micro-service architecture
CN107168746A (en) * 2017-05-27 2017-09-15 北京中电普华信息技术有限公司 A kind of micro services generation method and device
CN110442817A (en) * 2019-07-18 2019-11-12 塔普翊海(上海)智能科技有限公司 A kind of development system and production method of web-based mixed reality
CN110727416A (en) * 2019-10-10 2020-01-24 广州趣丸网络科技有限公司 Development framework generation method and related device
US20200042328A1 (en) * 2018-08-03 2020-02-06 Dell Products L.P. Autonomous Creation of New Microservices and Modification of Existing Microservices
CN111897553A (en) * 2020-08-28 2020-11-06 杭州安恒信息技术股份有限公司 Project system building method, device, equipment and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105162884A (en) * 2015-09-25 2015-12-16 浪潮(北京)电子信息产业有限公司 Cloud management platform based on micro-service architecture
CN107168746A (en) * 2017-05-27 2017-09-15 北京中电普华信息技术有限公司 A kind of micro services generation method and device
US20200042328A1 (en) * 2018-08-03 2020-02-06 Dell Products L.P. Autonomous Creation of New Microservices and Modification of Existing Microservices
CN110442817A (en) * 2019-07-18 2019-11-12 塔普翊海(上海)智能科技有限公司 A kind of development system and production method of web-based mixed reality
CN110727416A (en) * 2019-10-10 2020-01-24 广州趣丸网络科技有限公司 Development framework generation method and related device
CN111897553A (en) * 2020-08-28 2020-11-06 杭州安恒信息技术股份有限公司 Project system building method, device, equipment and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115756450A (en) * 2022-12-05 2023-03-07 广州玖晔网络科技有限公司 Micro-service development method and system

Similar Documents

Publication Publication Date Title
US20150256709A1 (en) Information processing apparatus, information processing system, and device linkage method
US20050204298A1 (en) Method, system and program product for determining differences between an existing graphical user interface (GUI) mapping file and a current GUI
CN106533719A (en) Method and system for realizing cluster deployment
JP2009116733A (en) Application retrieval system, application retrieval method, monitor terminal, retrieval server, and program
CN103577165A (en) Form generation method and form generator
CN113360211A (en) Loading display method based on control and related equipment
CN113190152A (en) Method and device for switching application program theme
CN115617780A (en) Data import method, device, equipment and storage medium
JP2008112311A (en) Method and system for business process execution, and program
CN112506487A (en) Micro-service development method and device
CN113419818B (en) Basic component deployment method, device, server and storage medium
US20210409327A1 (en) Creating endpoints
CN114896003A (en) Page configuration method and device, storage medium and electronic device
CN110727416B (en) Development framework generation method and related device
CN104077400A (en) File recommending method
CN110389886B (en) Additional function testing method and device of main application program and storage medium
JP6300750B2 (en) Verification program, verification apparatus, and verification method
CN111125205A (en) Signboard data display method, terminal and storage medium
CN107301089B (en) APP deployment and calling method and terminal
JP2021033316A (en) Scenario providing system, scenario providing apparatus, scenario information providing method, and program
CN115437657A (en) Service starting method, device, equipment and storage medium
CN112748833B (en) Interface display method and device and computer readable medium
JP6540287B2 (en) INFORMATION PROCESSING SYSTEM, INFORMATION PROCESSING METHOD, AND PROGRAM
CN114936152A (en) Application testing method and device
CN113268332A (en) Continuous integration method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination