CN111399822A - Micro-service development method, device, equipment and computer storage medium - Google Patents

Micro-service development method, device, equipment and computer storage medium Download PDF

Info

Publication number
CN111399822A
CN111399822A CN202010187880.3A CN202010187880A CN111399822A CN 111399822 A CN111399822 A CN 111399822A CN 202010187880 A CN202010187880 A CN 202010187880A CN 111399822 A CN111399822 A CN 111399822A
Authority
CN
China
Prior art keywords
micro
service
file
configuration
code
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.)
Granted
Application number
CN202010187880.3A
Other languages
Chinese (zh)
Other versions
CN111399822B (en
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.)
Shenzhen Yanhua Information Technology Co ltd
Original Assignee
Shenzhen Yanhua Information Technology 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 Shenzhen Yanhua Information Technology Co ltd filed Critical Shenzhen Yanhua Information Technology Co ltd
Priority to CN202010187880.3A priority Critical patent/CN111399822B/en
Publication of CN111399822A publication Critical patent/CN111399822A/en
Application granted granted Critical
Publication of CN111399822B publication Critical patent/CN111399822B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a micro-service development method, a micro-service development device, micro-service development equipment and a computer readable storage medium. The method comprises the following steps: when a micro-service development request is received, outputting a configuration prompt; acquiring a micro-service configuration file input based on the configuration prompt, and uploading the micro-service configuration file to a configuration file directory on a server; querying the configuration file directory through a preset micro-service development tool, and executing operation according to the configuration file directory and the content thereof; and acquiring the micro-service public code obtained by operation, processing the micro-service public code to generate a micro-service code file, and providing micro-service through the micro-service code file. The invention presets the micro-service development tool and provides the public code of the micro-service through the micro-service development tool, thereby improving the efficiency of the micro-service development and ensuring the accuracy, convenience and normalization of the micro-service development.

Description

Micro-service development method, device, equipment and computer storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer storage medium for micro-service development.
Background
With the rapid development of computer technology, more and more micro services can be provided by a computer, wherein the micro services refer to the development of a single small-sized service with business functions, each service has own processing and lightweight communication mechanism, and can be deployed on a single or multiple servers.
Technical developers need to develop a large number of code files in the process of developing micro-services, codes existing in the code files are complex to repeat, and part of developers can extract a part of public codes for repeated use.
Disclosure of Invention
The invention mainly aims to provide a micro-service development method, a device, equipment and a computer storage medium, aiming at solving the technical problems of troublesome operation, low micro-service development efficiency, more errors in micro-service codes and serious waste of human resources in the current micro-service development.
In order to achieve the above object, the present invention provides a method for developing a micro service, which comprises the following steps:
when a micro-service development request is received, outputting a configuration prompt;
acquiring a micro-service configuration file input based on the configuration prompt, and uploading the micro-service configuration file to a configuration file directory on a server;
querying the configuration file directory through a preset micro-service development tool, and executing operation according to the configuration file directory and the content thereof;
and acquiring the micro-service public code obtained by operation, processing the micro-service public code to generate a micro-service code file, and providing micro-service through the micro-service code file.
Optionally, the step of obtaining the micro service profile input based on the configuration prompt and uploading the micro service profile to a profile directory on a server includes:
acquiring a micro service configuration file input based on the configuration prompt, acquiring a preset configuration rule associated with the micro service configuration file, and analyzing a configuration item in the micro service configuration file according to the preset configuration rule;
and uploading the micro service configuration file to a configuration file directory on a server when all configuration items in the micro service configuration file accord with the preset configuration rule.
Optionally, before the step of querying the configuration file directory through a preset micro-service development tool and executing an operation according to the configuration file directory and the content thereof, the method includes:
acquiring a predefined public code file, and adding the public code file to a public code database; the public code file comprises a macro definition file, a public method file, a database table building file and a micro service PC file;
and generating an executable file for calling the public code file in the public code database, and taking the executable file as a preset micro-service development tool.
Optionally, the micro-service profile comprises: a database table dictionary, a micro-service file and a micro-service deployment file;
the step of inquiring the configuration file directory through a preset micro-service development tool and executing operation according to the configuration file directory and the content thereof comprises the following steps:
querying the configuration file directory through a preset micro-service development tool, and determining the database table dictionary, the micro-service file and the micro-service deployment file contained in the configuration file directory;
and executing operation according to the database table dictionary, the micro-service file and the micro-service deployment file through the micro-service development tool.
Optionally, the step of obtaining the micro service common code obtained by running, processing the micro service common code to generate a micro service code file, and providing the micro service through the micro service code file includes:
acquiring micro-service public codes obtained by executing executable files in the preset micro-service development tool, and generating a feature code compiling prompt;
acquiring the written feature code, and combining the feature code and the micro-service public code to generate a micro-service code file so as to provide micro-service through the micro-service code file.
Optionally, the step of obtaining the micro service common code obtained by running, processing the micro service common code to generate a micro service code file, and providing the micro service through the micro service code file includes:
acquiring micro-service public codes obtained by operation, and processing the micro-service public codes to generate micro-service code files;
running the micro service code file to obtain a code running result;
and when the code running result is correct, outputting a micro-service development completion prompt so as to provide micro-service through the micro-service code file.
Optionally, after the step of querying the configuration file directory through a preset micro-service development tool and executing an operation according to the configuration file directory and the content thereof, the method includes:
if the generated micro service code file is not received within a preset time period, checking and verifying a preset configuration rule associated with the micro service configuration file;
analyzing configuration items in the microservice configuration file according to the preset configuration rule;
and marking the target configuration items which do not accord with the preset configuration rule in the micro-service configuration file, and outputting a prompt of the micro-service configuration file configuration error.
In addition, to achieve the above object, the present invention provides a microservice developing apparatus including:
the request receiving module is used for outputting a configuration prompt when a micro-service development request is received;
the acquisition uploading module is used for acquiring a micro-service configuration file input based on the configuration prompt and uploading the micro-service configuration file to a configuration file directory on a server;
the file execution module is used for inquiring the configuration file directory through a preset micro-service development tool and executing operation according to the configuration file directory and the content of the configuration file directory;
and the processing generation module is used for acquiring the micro-service public code obtained by operation, processing the micro-service public code to generate a micro-service code file, and providing micro-service through the micro-service code file.
In addition, to achieve the above object, the present invention also provides a microservice developing apparatus including: the micro-service development system comprises a memory, a processor and a computer program corresponding to the micro-service development, wherein the computer program is stored on the memory and can run on the processor, and when being executed by the processor, the computer program realizes the steps of the micro-service development method.
Further, to achieve the above object, the present invention also provides a computer readable storage medium having stored thereon a computer program corresponding to microservice development, which when executed by a processor, implements the steps of the microservice development method as described above.
The invention provides a micro-service development method, a device, equipment and a computer storage medium, wherein in the embodiment of the invention, when a micro-service development request is received, a configuration prompt is output; acquiring a micro-service configuration file input based on the configuration prompt, and uploading the micro-service configuration file to a configuration file directory on a server; querying the configuration file directory through a preset micro-service development tool, and executing operation according to the configuration file directory and the content thereof; and acquiring the micro-service public code obtained by operation, processing the micro-service public code to generate a micro-service code file, and providing micro-service through the micro-service code file. In the technical scheme in the embodiment. In the embodiment, a micro-service development tool is preset, and public codes of micro-services are provided through the micro-service development tool according to configuration items of the micro-service configuration file, so that the efficiency of micro-service development is improved, and the micro-service development has more accuracy, convenience and normalization.
Drawings
FIG. 1 is a schematic diagram of an apparatus architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating the construction of a pre-defined microservice development tool according to a first embodiment of the microservice development method of the present invention;
FIG. 3 is a flowchart illustrating a first embodiment of a method for developing microservice according to the present invention;
fig. 4 is a functional module diagram of an embodiment of the microservice developing apparatus of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention. The micro service development device according to the embodiment of the present invention may be a PC or a server device, and as shown in fig. 1, the micro service development device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration of the apparatus shown in fig. 1 is not intended to be limiting of the apparatus and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein computer programs for operating the network communication module, the user interface module, and the micro service development.
In the device shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the micro-service stored in the memory 1005 to develop a corresponding computer program, and perform operations in the micro-service development method described below.
Based on the hardware structure, the embodiment of the micro-service development method is provided.
In a first embodiment of the microservice development method of the present invention, the microservice development method comprises:
when a micro-service development request is received, outputting a configuration prompt;
acquiring a micro-service configuration file input based on the configuration prompt, and uploading the micro-service configuration file to a configuration file directory on a server;
querying the configuration file directory through a preset micro-service development tool, and executing operation according to the configuration file directory and the content thereof;
and acquiring the micro-service public code obtained by operation, processing the micro-service public code to generate a micro-service code file, and providing micro-service through the micro-service code file.
The micro-service development method in the embodiment is applied to micro-service development equipment; before the first embodiment of the microservice development method of the present invention is executed, a microservice development device stores a preset microservice development tool, and referring to fig. 2, the step of constructing the preset microservice development tool includes:
step S01, obtaining a predefined public code file, and adding the public code file to a public code database; the public code file comprises a macro definition file, a public method file, a database table building file and a micro service PC file;
and step S02, generating an executable file in the executable public code database, and using the executable file as a preset micro-service development tool.
Specifically, the method comprises the following steps: the micro-service development equipment predefines public code files (the public code files comprise a macro definition file, a public method file, a database table building file, a micro-service PC file and the like), the micro-service development equipment compiles a program for generating the public code files to obtain executable files, and the micro-service development equipment takes the executable files as preset micro-service development tools.
For example: the macro definition file is a C language macro definition file, the macro definition file can generate a data table C structure body definition file and a macro definition database sequence file according to a configured database table dictionary, and strict data verification can be performed.
The common method file comprises a C language common method file, the C language common method file is a common method file for analyzing and assembling JSON (JavaScript Object Notification) formats of all table structures according to a configured database table dictionary, the C language common method file comprises a common method for taking a JSON structure data Object to a C structure Object, a common method for taking a JSON structure data Object array to a C structure array, a common method for taking a JSON structure data record number, a common method for assembling JSON to return error information, a common method for putting a C structure data Object to a JSON structure, a common method for putting a C structure data Object array to a JSON structure, and the like. In addition, the C language public method file also comprises the following steps: generating a public function for checking data fields, a public function for checking macro definition and a code-to-name method of the table according to a configured database table dictionary; meanwhile, a data table C structure initialization method, a data table C structure screen printing output method and a tail space method for removing character type field values from a data table are also generated; the C language public method file is set in the embodiment, the content covered by the C language public method file is very wide, developers can call the C language public method file according to needs, manual writing of micro-service developers is reduced, various repeated and tedious operations are not needed, and bugs can be effectively avoided.
The database listing file refers to a file composed of database listings SQ L (Structured Query L schema), and is also generated according to a database table dictionary configuration file.
The micro-service PC file is called as a micro-service development template file, the micro-service PC file is a PC file template for automatically generating micro-service development according to a designed micro-service configuration file, development codes for analyzing, assembling and checking input and output data are compiled in each PC file, and channel, login constraint, service calling authority check, dynamic signature check and customization of output parameters of each micro-service are finished without the need of a developer to compile codes by himself.
In addition, the public code files also comprise a single-table atomic operation public method file and a micro-service development template file, wherein the single-table atomic operation public method file comprises an atomic method for generating database operation according to a configured database table dictionary, a code file is correspondingly generated according to functions of adding, deleting, modifying, checking, locking tables and the like, each atomic method is named according to the specification according to the structure name of the data table, and the database operation is packaged SQ L.
In the embodiment, the micro-service development tool is preset in the micro-service development equipment and comprises a program for generating the public codes, so that developers can utilize the public codes only by configuring the micro-service configuration files according to project requirements, the public codes are generated to enable the developers to work more conveniently, more importantly, the chances of error making are less and less, a plurality of originally inevitable bugs are reduced, the code style and the frame are unified, development workload is greatly reduced, and the micro-service development efficiency is improved.
Referring to fig. 3, fig. 3 is a schematic flow chart of a first embodiment of a micro-service development method according to the present invention, in which the micro-service development method includes:
step S10, when receiving the micro service development request, outputting a configuration prompt;
the microservice development equipment receives the microservice development request, and the triggering mode of the microservice development request is not specifically limited, that is, the microservice development request can be actively triggered by a user, for example, the user clicks a 'microservice development' key on the microservice development equipment to actively trigger the microservice development request; or the micro-service development request may also be automatically triggered by the micro-service development device, for example, the automatic triggering condition of the micro-service development request preset in the micro-service development device is as follows: and when receiving a new project requirement, the micro-service development equipment judges that the new project requirement is met, and automatically triggers a micro-service development request.
When the micro-service development equipment receives a micro-service development request, the micro-service development equipment outputs a configuration prompt to prompt micro-service developers to configure micro-service configuration files related to micro-service development, wherein the micro-service configuration files comprise a database table dictionary, micro-service files, micro-service deployment files and the like.
And step S20, acquiring the micro service configuration file input based on the configuration prompt, and uploading the micro service configuration file to a configuration file directory on the server.
The method for generating the public code by the micro-service development equipment comprises the following steps of receiving a micro-service configuration file configured by a developer, and generating the corresponding public code according to the micro-service configuration file, wherein the method specifically comprises the following steps:
a1, acquiring a micro service configuration file input based on the configuration prompt, acquiring a preset configuration rule associated with the micro service configuration file, and analyzing a configuration item in the micro service configuration file according to the preset configuration rule;
step a2, when all configuration items in the micro service configuration file accord with the preset configuration rule, uploading the micro service configuration file to a configuration file directory on a server.
The method comprises the steps that micro-service development equipment obtains a micro-service configuration file input based on a configuration prompt, the micro-service development equipment obtains a preset configuration rule associated with the micro-service configuration file (the preset configuration rule refers to a predefined configuration item check rule, the preset configuration rule can check each configuration item in the micro-service configuration file and determine whether the configuration item is correct or not), and the micro-service development equipment analyzes the configuration item in the micro-service configuration file according to the preset configuration rule; the micro-service development equipment judges whether all configuration items in the micro-service configuration file accord with a preset configuration rule or not, outputs reconfiguration prompt information when a target configuration item which does not accord with the preset configuration rule exists in the micro-service configuration file, and uploads the micro-service configuration file to a configuration file directory on the server when all configuration items in the micro-service configuration file accord with the preset configuration rule.
In the embodiment, the micro-service development equipment verifies the micro-service configuration file, and when the micro-service configuration file passes the verification, the preset configuration rule is uploaded to the configuration file directory on the server, so that the accuracy of the micro-service configuration file is improved, and the micro-service development error caused by the micro-service configuration file error is avoided.
And step S30, inquiring the configuration file directory through a preset micro-service development tool, and executing operation according to the configuration file directory and the content thereof.
The method includes that a micro-service development device queries a configuration file directory through a preset micro-service development tool, and searches a corresponding micro-service configuration file in the configuration file directory, and specifically includes:
b1, querying the configuration file directory through a preset micro service development tool, and determining the database table dictionary, the micro service file and the micro service deployment file contained in the configuration file directory;
step b2, executing operation according to the database table dictionary, the micro service file and the micro service deployment file through the micro service development tool.
The micro-service development equipment stores all micro-service configuration files in a configuration file directory, executes executable files of the micro-service development tool, and selectively generates various public codes and interface files according to the guide to realize file generation.
And step S40, acquiring the micro service public code obtained by operation, processing the micro service public code to generate a micro service code file, and providing the micro service through the micro service code file.
Specifically, the method comprises the following steps:
step c1, acquiring micro service public codes obtained by operation, and generating a feature code writing prompt;
and c2, acquiring the written feature codes, combining the feature codes and the micro-service public codes to generate a micro-service code file, and providing micro-services through the micro-service code file.
The micro-service development equipment acquires micro-service public codes obtained by operation and generates a feature code compiling prompt; prompting a user to compile micro-service feature codes, acquiring the compiled feature codes by micro-service development equipment, combining the feature codes and micro-service common codes by the micro-service development equipment to generate a micro-service code file, and providing micro-service by the micro-service code file
In the embodiment, a micro-service development tool is preset, and public codes of micro-services are provided through the micro-service development tool according to configuration items of the micro-service configuration file, so that the efficiency of micro-service development is improved, and the micro-service development has more accuracy, convenience and normalization.
Further, based on the first embodiment of the microservice development method of the present invention, a second embodiment of the microservice development method of the present invention is proposed.
This embodiment is a refinement of step S40 in the first embodiment, and is different from the above embodiments in that:
acquiring micro-service public codes obtained by operation, and processing the micro-service public codes to generate micro-service code files;
running the micro service code file to obtain a code running result;
and when the code running result is correct, outputting a micro-service development completion prompt so as to provide micro-service through the micro-service code file.
In the embodiment, the micro-service development equipment acquires micro-service public codes obtained by operation, and combines the micro-service public codes with feature codes compiled by a user to generate a micro-service code file; the micro-service development equipment runs a micro-service code file to obtain a code running result; when the code running result is wrong, the micro-service development equipment outputs a micro-service development error prompt to prompt a user to adjust a micro-service code file; when the code running result is correct, the micro-service development equipment outputs a micro-service development completion prompt so that a user provides micro-services through the micro-service code file.
In the embodiment, the micro-service development equipment can verify the developed micro-service file, so that the efficiency and the accuracy of micro-service development are improved.
Further, based on the foregoing embodiment of the method for developing a micro-service of the present invention, a third embodiment of the method for developing a micro-service of the present invention is provided.
This embodiment is a step after step S30 in the first embodiment, and is different from the above-described embodiments in that:
if the executed micro service code file is not received within a preset time period, acquiring a preset configuration rule associated with the micro service configuration file;
analyzing configuration items in the microservice configuration file according to the preset configuration rule;
and marking the target configuration items which do not accord with the preset configuration rule in the micro-service configuration file, and outputting a prompt of the micro-service configuration file configuration error.
In this embodiment, the microservice development device detects whether the compiled microservice development tool is successfully compiled, and if the compiled microservice code file is not received within a preset time period (the preset time period may be set according to a specific scenario, for example, the preset time period is set to 1 minute), the microservice development device obtains a preset configuration rule associated with the microservice configuration file (the preset configuration rule is the same as that in the first embodiment, and details are not described in this embodiment); the micro-service development equipment analyzes configuration items in the micro-service configuration file according to a preset configuration rule; and marking the target configuration items which do not accord with the preset configuration rule in the micro-service configuration file by the micro-service development equipment, and outputting a prompt of the configuration error of the micro-service configuration file.
In the embodiment, when the micro-service development device cannot correctly execute the pass, the micro-service configuration file is checked, and an error configuration item is searched, so that the adjustment by a user is facilitated, and the workload of a micro-service developer is reduced.
Referring to fig. 4, the present invention also provides a micro-service development apparatus, including:
a request receiving module 10, configured to output a configuration prompt when receiving a micro-service development request;
the acquisition uploading module 20 is used for acquiring a micro-service configuration file input based on the configuration prompt, and uploading the micro-service configuration file to a configuration file directory on a server;
the file execution module 30 is configured to query the configuration file directory through a preset micro-service development tool, and execute an operation according to the configuration file directory and the content thereof;
and the processing generation module 40 is configured to obtain the micro-service public code obtained by running, process the micro-service public code, and generate a micro-service code file, so as to provide a micro-service through the micro-service code file.
In an embodiment, the acquisition uploading module 20 includes:
the rule obtaining unit is used for obtaining a micro service configuration file input based on the configuration prompt, obtaining a preset configuration rule associated with the micro service configuration file, and analyzing configuration items in the micro service configuration file according to the preset configuration rule;
and the file uploading unit is used for uploading the micro-service configuration file to a configuration file directory on a server when all configuration items in the micro-service configuration file accord with the preset configuration rule.
In one embodiment, the microservice developing apparatus includes:
the file acquisition module is used for acquiring a predefined public code file and adding the public code file to a public code database; the public code file comprises a macro definition file, a public method file, a database table building file and a micro service PC file;
and the file execution module is used for generating an executable file for calling the public code file in the public code database, and taking the executable file as a preset micro-service development tool.
In one embodiment, the microservice profile includes: a database table dictionary, a micro-service file and a micro-service deployment file;
the file execution module 30 includes:
the file query unit is used for querying the configuration file directory through a preset micro-service development tool and determining the database table dictionary, the micro-service file and the micro-service deployment file contained in the configuration file directory;
and the file editing unit is used for executing operation according to the database table dictionary, the micro service file and the micro service deployment file through the micro service development tool.
In one embodiment, the process generating module 40 includes:
the acquisition generating unit is used for acquiring micro-service public codes obtained by operation and generating a feature code compiling prompt;
and the combination generating unit is used for acquiring the written feature codes and combining the feature codes and the micro-service common codes to generate a micro-service code file so as to provide micro-services through the micro-service code file.
In one embodiment, the process generating module 40 includes:
the acquisition processing unit is used for acquiring micro-service public codes obtained by operation and processing the micro-service public codes to generate micro-service code files;
the code transportation unit is used for operating the micro service code file to obtain a code operation result;
and the output prompting unit is used for outputting a micro-service development completion prompt when the code running result is correct so as to provide micro-service through the micro-service code file.
In one embodiment, the microservice developing apparatus includes:
the rule acquisition module is used for checking a preset configuration rule associated with the micro service configuration file if the compiled micro service code file is not received within a preset time period;
the file analysis module is used for analyzing configuration items in the microservice configuration file according to the preset configuration rule;
and the mark output module is used for marking the target configuration items which do not accord with the preset configuration rule in the micro-service configuration file and outputting the prompt of the configuration error of the micro-service configuration file.
The method implemented when the micro service development device is executed may refer to each embodiment of the micro service development method of the present invention, and details are not repeated herein.
In the embodiment, a micro-service development tool is preset, and public codes of micro-services are provided through the micro-service development tool according to configuration items of the micro-service configuration file, so that the efficiency of micro-service development is improved, and the micro-service development has more accuracy, convenience and normalization.
The invention also provides a computer readable storage medium.
The computer readable storage medium of the present invention stores thereon a computer program corresponding to microservice development, which when executed by a processor implements the steps of the microservice development method as described above.
The method implemented when the computer program corresponding to the microservice development running on the processor is executed may refer to each embodiment of the microservice development method of the present invention, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A micro-service development method is characterized by comprising the following steps:
when a micro-service development request is received, outputting a configuration prompt;
acquiring a micro-service configuration file input based on the configuration prompt, and uploading the micro-service configuration file to a configuration file directory on a server;
querying the configuration file directory through a preset micro-service development tool, and executing operation according to the configuration file directory and the content thereof;
and acquiring the micro-service public code obtained by operation, processing the micro-service public code to generate a micro-service code file, and providing micro-service through the micro-service code file.
2. The microservice development method of claim 1, wherein the step of obtaining a microservice profile based on the configuration prompt input, uploading the microservice profile to a profile directory on a server, comprises:
acquiring a micro service configuration file input based on the configuration prompt, acquiring a preset configuration rule associated with the micro service configuration file, and analyzing a configuration item in the micro service configuration file according to the preset configuration rule;
and uploading the micro service configuration file to a configuration file directory on a server when all configuration items in the micro service configuration file accord with the preset configuration rule.
3. The microservice development method of claim 1, wherein the step of querying the profile directory using a predetermined microservice development tool and executing the execution operation based on the profile directory and its contents is preceded by the steps of:
acquiring a predefined public code file, and adding the public code file to a public code database; the public code file comprises a macro definition file, a public method file, a database table building file and a micro service PC file;
and generating an executable file for calling the public code file in the public code database, and taking the executable file as a preset micro-service development tool.
4. The microservice development method of claim 1, wherein the microservice profile comprises: a database table dictionary, a micro-service file and a micro-service deployment file;
the step of inquiring the configuration file directory through a preset micro-service development tool and executing operation according to the configuration file directory and the content thereof comprises the following steps:
querying the configuration file directory through a preset micro-service development tool, and determining the database table dictionary, the micro-service file and the micro-service deployment file contained in the configuration file directory;
and executing operation according to the database table dictionary, the micro-service file and the micro-service deployment file through the micro-service development tool.
5. The micro-service development method of claim 1, wherein the step of obtaining the micro-service common code obtained by operation, processing the micro-service common code to generate a micro-service code file, and providing the micro-service through the micro-service code file comprises:
acquiring micro-service public codes obtained by operating an executable file in the preset micro-service development tool, and generating a feature code compiling prompt;
acquiring the written feature code, and combining the feature code and the micro-service public code to generate a micro-service code file so as to provide micro-service through the micro-service code file.
6. The microservice development method of claim 1, wherein the step of obtaining the microservice common code obtained by running, processing the microservice common code generation and microservice code file to provide microservice through the microservice code file comprises:
acquiring micro-service public codes obtained by operation, and processing the micro-service public codes to generate micro-service code files;
running the micro service code file to obtain a code running result;
and when the code running result is correct, outputting a micro-service development completion prompt so as to provide micro-service through the micro-service code file.
7. The microservice development method of any of claims 1 to 6, wherein the step of querying the profile directory through a predetermined microservice development tool and performing a running operation based on the profile directory and its contents comprises:
if the generated micro service code file is not received within a preset time period, checking a preset configuration rule associated with the micro service configuration file;
analyzing configuration items in the microservice configuration file according to the preset configuration rule;
and marking the target configuration items which do not accord with the preset configuration rule in the micro-service configuration file, and outputting a prompt of the micro-service configuration file configuration error.
8. A microservice development device, comprising:
the request receiving module is used for outputting a configuration prompt when a micro-service development request is received;
the acquisition uploading module is used for acquiring a micro-service configuration file input based on the configuration prompt and uploading the micro-service configuration file to a configuration file directory on a server;
the file execution module is used for inquiring the configuration file directory through a preset micro-service development tool and executing operation according to the configuration file directory and the content of the configuration file directory;
and the processing generation module is used for acquiring the micro-service public code obtained by operation, processing the micro-service public code to generate a micro-service code file, and providing micro-service through the micro-service code file.
9. A microservice development device, the microservice development device comprising: memory, processor and a microservice development corresponding computer program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the microservice development method according to any of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program for microservice development is stored, which, when being executed by a processor, carries out the steps of a microservice development method according to any one of claims 1 to 7.
CN202010187880.3A 2020-03-17 2020-03-17 Micro-service development method, device, equipment and computer storage medium Active CN111399822B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010187880.3A CN111399822B (en) 2020-03-17 2020-03-17 Micro-service development method, device, equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010187880.3A CN111399822B (en) 2020-03-17 2020-03-17 Micro-service development method, device, equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN111399822A true CN111399822A (en) 2020-07-10
CN111399822B CN111399822B (en) 2023-08-08

Family

ID=71428857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010187880.3A Active CN111399822B (en) 2020-03-17 2020-03-17 Micro-service development method, device, equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN111399822B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416757A (en) * 2020-11-03 2021-02-26 前海飞算云智软件科技(深圳)有限公司 Component development method, device, storage medium and electronic equipment
CN112650542A (en) * 2020-08-28 2021-04-13 成都格斗科技有限公司 Simple and general method for generating and managing configuration file under micro-service architecture
CN113342423A (en) * 2021-06-29 2021-09-03 北京奇艺世纪科技有限公司 Configuration file updating method and device
CN113656010A (en) * 2021-08-31 2021-11-16 浪潮通用软件有限公司 Method, system, equipment and medium for automatically creating code warehouse by microservice
WO2023039741A1 (en) * 2021-09-15 2023-03-23 国云科技股份有限公司 Online development method and apparatus based on microservice system, device, and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180088935A1 (en) * 2016-09-27 2018-03-29 Ca, Inc. Microservices application configuration based on runtime environment
CN108134696A (en) * 2017-12-15 2018-06-08 云宏信息科技股份有限公司 A kind of micro services configuration update method and device
CN108156022A (en) * 2017-12-04 2018-06-12 北京奇艺世纪科技有限公司 A kind of service calling method, device and electronic equipment
US20180198845A1 (en) * 2017-01-09 2018-07-12 International Business Machines Corporation Local Microservice Development for Remote Deployment
CN109358880A (en) * 2018-10-18 2019-02-19 行吟信息科技(上海)有限公司 A kind of universal gateway configuration method and device
US20190095197A1 (en) * 2017-09-28 2019-03-28 International Business Machines Corporation Re-use of code
CN109857427A (en) * 2018-12-29 2019-06-07 深圳云天励飞技术有限公司 Configure update method and Related product
CN109918126A (en) * 2019-01-28 2019-06-21 平安普惠企业管理有限公司 Method, apparatus, computer equipment and the storage medium of Code Edit
CN109947399A (en) * 2019-01-25 2019-06-28 深圳壹账通智能科技有限公司 Code structure generation method, device, computer installation and readable storage medium storing program for executing
CN110018822A (en) * 2019-04-16 2019-07-16 山东浪潮通软信息科技有限公司 A kind of method and system automatically generating micro services function

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180088935A1 (en) * 2016-09-27 2018-03-29 Ca, Inc. Microservices application configuration based on runtime environment
US20180198845A1 (en) * 2017-01-09 2018-07-12 International Business Machines Corporation Local Microservice Development for Remote Deployment
US20190095197A1 (en) * 2017-09-28 2019-03-28 International Business Machines Corporation Re-use of code
CN108156022A (en) * 2017-12-04 2018-06-12 北京奇艺世纪科技有限公司 A kind of service calling method, device and electronic equipment
CN108134696A (en) * 2017-12-15 2018-06-08 云宏信息科技股份有限公司 A kind of micro services configuration update method and device
CN109358880A (en) * 2018-10-18 2019-02-19 行吟信息科技(上海)有限公司 A kind of universal gateway configuration method and device
CN109857427A (en) * 2018-12-29 2019-06-07 深圳云天励飞技术有限公司 Configure update method and Related product
CN109947399A (en) * 2019-01-25 2019-06-28 深圳壹账通智能科技有限公司 Code structure generation method, device, computer installation and readable storage medium storing program for executing
CN109918126A (en) * 2019-01-28 2019-06-21 平安普惠企业管理有限公司 Method, apparatus, computer equipment and the storage medium of Code Edit
CN110018822A (en) * 2019-04-16 2019-07-16 山东浪潮通软信息科技有限公司 A kind of method and system automatically generating micro services function

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张晶;黄小锋;: "一种基于微服务的应用框架", 计算机系统应用, no. 09 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650542A (en) * 2020-08-28 2021-04-13 成都格斗科技有限公司 Simple and general method for generating and managing configuration file under micro-service architecture
CN112416757A (en) * 2020-11-03 2021-02-26 前海飞算云智软件科技(深圳)有限公司 Component development method, device, storage medium and electronic equipment
CN112416757B (en) * 2020-11-03 2021-11-12 前海飞算云智软件科技(深圳)有限公司 Component development method, device, storage medium and electronic equipment
CN113342423A (en) * 2021-06-29 2021-09-03 北京奇艺世纪科技有限公司 Configuration file updating method and device
CN113342423B (en) * 2021-06-29 2023-09-05 北京奇艺世纪科技有限公司 Configuration file updating method and device
CN113656010A (en) * 2021-08-31 2021-11-16 浪潮通用软件有限公司 Method, system, equipment and medium for automatically creating code warehouse by microservice
CN113656010B (en) * 2021-08-31 2024-01-30 浪潮通用软件有限公司 Method, system, equipment and medium for automatically creating code warehouse by micro service
WO2023039741A1 (en) * 2021-09-15 2023-03-23 国云科技股份有限公司 Online development method and apparatus based on microservice system, device, and storage medium

Also Published As

Publication number Publication date
CN111399822B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
CN111399822A (en) Micro-service development method, device, equipment and computer storage medium
CN110750442A (en) Test case generation method, device, equipment and storage medium
US20180024979A1 (en) Forms conversion and deployment system for mobile devices
CN110955416A (en) Interface document generation method, device, equipment and computer storage medium
CN109726105B (en) Test data construction method, device, equipment and storage medium
CN110825634A (en) Parameter quality checking method, device and equipment and computer readable storage medium
CN111596902B (en) Method, device, equipment and storage medium for building front-end and back-end development framework
CN107995153B (en) Form data verification method and form data verification device
CN111026670B (en) Test case generation method, test case generation device and storage medium
CN111626028A (en) Report generation method, device and equipment based on function analysis and computer medium
CN111475390A (en) Log collection system deployment method, device, equipment and storage medium
CN111522849A (en) Database dynamic access method, server and storage medium
CN110597896A (en) Data display method, data display device and terminal equipment
CN112214714A (en) Request processing method, device and equipment based on configuration file and storage medium
CN111538659A (en) Interface testing method and system for service scene, electronic device and storage medium
CN111008151A (en) Program scanning method, terminal device, and computer-readable storage medium
CN113901083A (en) Heterogeneous data source operation resource analysis positioning method and equipment based on multiple analyzers
CN115794214B (en) Application module metadata management method, device, storage medium and apparatus
CN115525534A (en) Test case generation method and platform based on swagger interface test
CN116991872A (en) Data query method, device and computer readable storage medium
CN110874278A (en) Embedding method of external system, workflow system, device and storage medium
CN111151008B (en) Verification method and device for game operation data, configuration background and medium
CN110413518B (en) Control object library generation method and device and computer readable storage medium
CN113656036B (en) Compiling method, device, terminal and medium based on Mybatis
CN115391369A (en) Operation method, device and equipment of data engine and storage medium

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
GR01 Patent grant
GR01 Patent grant