CN106254423A - The method realizing Restful service release quickly based on micro services framework - Google Patents

The method realizing Restful service release quickly based on micro services framework Download PDF

Info

Publication number
CN106254423A
CN106254423A CN201610571562.0A CN201610571562A CN106254423A CN 106254423 A CN106254423 A CN 106254423A CN 201610571562 A CN201610571562 A CN 201610571562A CN 106254423 A CN106254423 A CN 106254423A
Authority
CN
China
Prior art keywords
restful
service
micro services
api
services framework
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
CN201610571562.0A
Other languages
Chinese (zh)
Other versions
CN106254423B (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.)
PRIMETON INFORMATION TECHNOLOGY Co Ltd
Original Assignee
PRIMETON 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 PRIMETON INFORMATION TECHNOLOGY Co Ltd filed Critical PRIMETON INFORMATION TECHNOLOGY Co Ltd
Priority to CN201610571562.0A priority Critical patent/CN106254423B/en
Publication of CN106254423A publication Critical patent/CN106254423A/en
Application granted granted Critical
Publication of CN106254423B publication Critical patent/CN106254423B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention relates to a kind of method realizing Restful service release quickly based on micro services framework, comprise the steps: that (1) is patterned service assembling and processes;(2) service operation process is carried out.Using this method realizing Restful service release quickly based on micro services framework, user can issue into Restful API by any one common Javabean of simple and convenient of pattern technology;Greatly improve the integrated efficiency between micro services application system, allow service logic can be issued as Restful service quickly, intuitively, reduce the cost that exploitation is safeguarded;The method simultaneously using the present invention can be issued as Restful service quickly, intuitively by existing business function, it is easy to business event framework make the transition and stable and reliable working performance to micro services framework, being with a wide range of applications, solid foundation has been established in the development further for operation system micro services software engineering.

Description

The method realizing Restful service release quickly based on micro services framework
Technical field
The present invention relates to computer software technical field, particularly relate to micro services framework applications systems technology field, specifically Refer to a kind of method realizing Restful service release quickly based on micro services framework.
Background technology
In 2014, Sam Newman, Martin Fowler, a colleague of Thought Works, published one New book " Building Microservices ".This book describes how according to the design of Microservice architecture mode and builds One system with good autgmentability Sustainable Exploitation.In addition, this book is also by phylogeny stream based on this pattern The most popular development process such as journey and Continuous Delivery (persistently paying) are combined togather so that Microservice architecture mode seems the most attractive.For these reasons, this architecture mode is rapidly by industry institute Knowing, and successfully use in multiple products, have an immense impact on power.
REST (Representational State Transfer, declarative state shifts) describes a framework sample The network system of formula, such as weblication.It occurs in the thesis for the doctorate of Roy Fielding in 2000 first, and he is One of main author of HTTP specification.In three kinds of Web service interaction schemes of current main flow, REST is compared to SOAP (Simple Object Accessprotocol, Simple Object Access Protocol) and XML-RPC are simpler to be understood, either Processing URL or the coding to Payload, REST tends to design by the method for simpler light weight and realize.Value Obtain it is to be noted that REST does not has a clear and definite standard, and more like the style of a kind of design.REST refers to one group of framework Constraints and principle.Meet these constraintss and the application program of principle or design is exactly Restful.
Along with assembly splits, services decoupling, calling between each assembly is all to be realized by interface, and REST can allow these Service style after fractionation is unified, be easy to maintenance and management, and REST simple clearly, service directly communicate and http it On be mutually in step, and because they need not any extra bottom architecture so that REST becomes micro services synchronous communication Primary selection.
Look at traditional web development scheme first, be easier to understand that what is Microservice by contrast Architecture.Corresponding with Microservice (micro services), this mode is commonly referred to as Monolithic.All Function be packaged in a WAR bag, be deployed in a JEE container (Tomcat, JBoss, WebLogic) inner, contain DO/ All logics such as DAO, Service, UI.(as shown in Figure 1)
Owing to Monolithic has the disadvantage in that (1) development efficiency is low: all of exploitation changes code a project, Submitting code mutually to wait, code conflicts is continuous;(2) code maintenance is difficult: code function is coupled, new person do not know what from Set about;(3) dispose dumb: build the time long, any little amendment must rebuild whole project, and this process is the most very Long;(4) stability is the highest: an inappreciable minor issue, and whole application can be caused to hang;(5) autgmentability is inadequate: cannot Meet the business demand under high complications, and development language and the type selecting of framework and change.So, the design of present main flow Typically can use Microservice Architecture, it is simply that framework based on micro services.In simple terms, as in figure 2 it is shown, The purpose of micro services is effectively to split application, it is achieved agile development and deployment.
Owing to there is multiple micro services in micro services framework, then the communication between service just seems critically important, between service Communication mode have two kinds: synchronization mechanism (REST, RPC) based on http protocol;Asynchronous message based on message queue processes Mechanism (AMQP-based message broker).REST refers to one group of framework constraints and principle.Meet these constraints Condition and the application program of principle or design are exactly Restful, simultaneously its lightweight and directly transmit data by HTTP Characteristic, uses Restful framework to have become as most common process in micro services.Being appreciated that Restful framework, the best way is just It is to understand that what meaning Representational this phrase of State Transfer is on earth, its each word generation What connotation of table, specific as follows shown in:
In the title " presentation layer condition conversion " of resource (Resources): REST, eliminate subject." presentation layer " in fact Refer to " presentation layer " of " resource " (Resources).
So-called resource, it is simply that the specifying information on an entity, or perhaps network on network.It can be one Duan Wenben, a pictures, a song, a kind of service, be exactly in a word one concrete tangible.You can be (unified with a URI URLs) point to it, every kind of corresponding specific URI of resource.Obtaining this resource, the URI accessing it is the most permissible, Therefore URI has just become the address of each resource or unique identifier.So-called " online ", it is simply that be with on the Internet one " resource " of row is interactive, calls its URI.
Presentation layer (Representation): " resource " is a kind of information entity, and it can have multiple external expressive form. The form that we specifically present resource, is called its " presentation layer " (Representation).Such as, text can be used Txt form shows, it is also possible to html format, XML format, the performance of JSON form, it might even be possible to use binary format;Picture Can show with JPG form, it is also possible to show with PNG format.
URI only represents the entity of resource, does not represent its form.Strictly speaking, " .html " suffix that some network address is last Name is unnecessary, because this suffix name presentation format, belongs to " presentation layer " category, and URI should only represent " resource " Position.Its concrete manifestation form, it should specify by Accept and Content-Type field in the header of HTTP request, The two field is only the description to " presentation layer ".
Condition conversion (State Transfer): access a website, just represents one of client and server mutually Dynamic process.In this process, the change of data and state certainly will be related to.Internet communication protocol http protocol, is one Stateless protocol.It means that all of state is all saved in server end.Therefore, if client is wanted to operate server, Certain means must be passed through, allow server end that " condition conversion " (State Transfer) occurs.And this conversion is built upon On presentation layer, so being exactly " presentation layer condition conversion ".
The means that client is used, can only be http protocols.Specifically, it is simply that inside http protocol, four represent behaviour Make the verb of mode: GET, POST, PUT, DELETE.They the most corresponding four kinds of basic operation: GET are used for obtaining resource, POST is used for newly-built resource (can be used for more new resources), and PUT is used for more new resources, and DELETE is used for deleting resource.
All there is corresponding Restful framework in the development language in current main flow, the Rest Easy in such as Java, Spring MVC;Slim Framework, Yii in PHP;Grape in Ruby etc..
Although Restful well solves and synchronizes communication based on Http between micro services, but current all frameworks Do not account for for there is system (not using the framework of Restful due to original system) support.Due to Java language Reaching in market share more than 20%, this mainly takes Java language to do the example of total solution.Exist Javabean is not because using Restful framework, it is impossible to carrying out the issue of Restful API, it is past that enterprise faces this problem Toward original system can only being developed again, being faced with type selecting and the upgrading of technological frame, can bring and cause easily going out Wrong and the safety of system and stability problem, can bring huge cost burden simultaneously.For this situation, we provide A kind of pattern technology, packs for bottom, and user can pass through simple and convenient of pattern technology, and any one is common Javabean issue into Restful API.This technology can be greatly improved the integrated efficiency between micro services system, allows business patrol Collect and can be issued as Restful service quickly, intuitively, substantially increase development efficiency and legacy system cost free becomes in incognito Business system, the Restful service of general unit EOS product is issued assembly and is based on the realization of this technology.
Summary of the invention
It is an object of the invention to the shortcoming overcoming above-mentioned prior art, it is provided that one be capable of dynamic, quickly send out The api interface of cloth Restful and Javabean is issued into Restful API realize Restful clothes based on micro services framework The method of business release quickly.
To achieve these goals, having of the present invention is constituted as follows:
The method that should realize Restful service release quickly based on micro services framework, comprises the steps:
(1) it is patterned service assembling to process;
(2) service operation process is carried out.
It is preferred that described step (1) comprises the steps:
(1-1) judge that the method for existing business function had been issued Restful and serviced api interface, if it is, Continue step (1-5), otherwise continue step (1-2);
(1-2) newly-built component bag;
(1-3) in this newly-built component bag, installation diagram file is created;
(1-4) according to the operation of user, the realization of existing business function is dragged in installation diagram, generates one or more The api interface of Restful and relevant doc describe document, continue step (1-6);
(1-5) user's click function list diagram, revises the api interface of one or more Restful and relevant doc Document is described;
(1-6) keep installation diagram file, and by towards micro services framework applications system, this installation diagram file is compiled Checking, the doc generating Restful API describes document;
(1-7) in described component bag, create or revise the Mock data literary composition of the Restful service api interface of correspondence Mock data in part;
(1-8) clicking on deployment assembling file, graphical service mounting plate is the API issue of the Restful of assembling file Become the service of Restful to service operation platform, Doc and the Mock document of corresponding Restful API is published to clothes simultaneously Business operation platform respective directories.
More preferably, the described method judging existing business function had been issued Restful and had been serviced api interface, Particularly as follows:
Judge whether that the doc being correlated with describes document.
More preferably, described component bag is the physical location comprising certain function logic, and described component bag includes realizing All dependence resources of business function.
More preferably, described step (1-5) comprises the following steps:
(1-5-1) from explorer, the realization of existing business function is pulled in visual editor;
(1-5-2) method in realizing business function checks one by one, it is judged that in the parameter of the method and return value Whether include complex data type, if it is, continue step (1-5-3), otherwise continue step (1-6);
(1-5-3) judge incoming parameter or return whether data contain List, Map or Javabean complex data type, If it is, continue step (1-5-4), otherwise continue step (1-5-5);
(1-5-4) the concrete data type of the element deposited in configuration complex data type, continues step (1-6);
(1-5-5) ejecting service assembling guide, in guide, title and the Restful api interface of input link describes letter Breath.
Further, described Restful api interface describes information and includes url, descriptive text, request type, biography Enter parameter, return form and return JSON.
More preferably, described step (1-6) comprises the steps:
(1-6-1) it is compiled newly-generated component checking, it may be judged whether there is compile error, if it is, continue Step (1-6-2), otherwise continues step (1-6-3);
(1-6-2) prompting user is modified, and continues step (1-7);
(1-6-3) clicking on preservation installation diagram file, the doc generating Restful API describes document.
Further, described compile error includes explaining tag error and interface describes mistake.
More preferably, described step (1-8) comprises the steps:
(1-8-1) new projects are set up;
(1-8-2) the component bag that right click is newly-generated, ejects and disposes button;
(1-8-3) clicking on deployment button, the API of the Restful of assembling file is published to service operation platform and becomes The service of Restful.
Further, described new projects include that this realizes Restful service in micro services framework applications system The framework that the service operation Mock of release quickly and Doc platform are relied on.
Further, the API of the Restful of described assembling file is published to service operation platform and becomes Restful Service, particularly as follows:
Doc Yu Mock file is cloned under the respective directories of the new projects described in deployment, completes deployment operation.
It is preferred that described step (2) comprises the following steps:
(2-1) server of service operation Mock and Doc platform is started;
(2-2) by the address of the server described in browser access, check that the api interface of Restful describes information;
(2-3) describe information according to the api interface of Restful, carry out the Mock test of API.
More preferably, described description information includes url, descriptive text, request type, incoming parameter, returns form and return Return JSON.
Further, described request type includes GET, POST, PUT and DELETE.
Further, described step (2-2) comprises the steps:
(2-2-1) inquiry startup of server port information and url chained address;
(2-2-2) by described in browser access step url chained address, check all Restful issued API list, by the Restful API summary info that described url inquiry is corresponding;
(2-2-3) summary info of the Restful API described in click, checks the description information of Restful API.
More preferably, described step (2-3) comprises the steps:
(2-3-1) according to the details descriptive text of Restful API, the data of correspondence are filled according to Mock data Carry out http to call, and return corresponding data;
(2-3-2) judge to return result the most correct, if it is, end step, otherwise continue step (2-3-4)
(2-3-4) according to information, debugging is carried out until return result is correct.
Further, described judgement returns result, particularly as follows:
The Schema of the data form of return and data with Restful API definition is compared, it is judged that return result The most correct.
Have employed the method realizing Restful service release quickly based on micro services framework in this invention, it can be deduced that Have employed the Restful API release quickly method realizing micro services framework in the business application system of this invention so that exploitation And issue Restful becomes abnormal simple, development efficiency is greatly improved, simultaneously by patterned exploitation and publisher Formula so that user need not too many understanding to the details of Restful, reduces study and the cost safeguarded, especially by Packing for bottom, user can be issued into by any one common Javabean of simple and convenient of pattern technology Restful API;The method using the present invention can be issued as Restful service quickly, intuitively by existing business function, Substantially increase the integrated efficiency between application system, substantially increase development efficiency and legacy system cost free becomes micro services system System, and stable and reliable working performance, the scope of application are relatively broad, it is simple to and business event framework makes the transition to micro services framework..
Accompanying drawing explanation
Fig. 1 is the system allomeric function module diagram of prior art.
Fig. 2 is the micro services framework schematic diagram of prior art.
Fig. 3 is the system entirety merit of the method realizing Restful service release quickly based on micro services framework of the present invention Can schematic diagram.
Fig. 4 be the present invention based on micro services framework realize Restful service release quickly method method in be System allomeric function schematic flow sheet.
Fig. 5 is the Restful API of the method realizing Restful service release quickly based on micro services framework of the present invention Service assembling schematic diagram.
Fig. 6 is the Restful service of the method realizing Restful service release quickly based on micro services framework of the present invention Mock calls schematic diagram.
Fig. 7 is realizing the external call of method of Restful service release quickly based on micro services framework and sending out of the present invention Cloth Restful API service schematic diagram.
Detailed description of the invention
In order to more clearly describe the technology contents of the present invention, carry out further below in conjunction with specific embodiment Describe.
In one effectively embodiment, the method that Restful service release quickly should be realized based on micro services framework, Comprise the steps:
(1) it is patterned service assembling to process;
(2) service operation process is carried out.
In one preferably embodiment, described step (1) comprises the steps:
(1-1) judge that the method for existing business function had been issued Restful and serviced api interface, if it is, Continue step (1-5), otherwise continue step (1-2);
(1-2) newly-built component bag;
(1-3) in this newly-built component bag, installation diagram file is created;
(1-4) according to the operation of user, the realization of existing business function is dragged in installation diagram, generates one or more The api interface of Restful and relevant doc describe document, continue step (1-6);
(1-5) user's click function list diagram, revises the api interface of one or more Restful and relevant doc Document is described;
(1-6) keep installation diagram file, and by towards micro services framework applications system, this installation diagram file is compiled Checking, the doc generating Restful API describes document;
(1-7) in described component bag, create or revise the Mock data literary composition of the Restful service api interface of correspondence Mock data in part;
(1-8) clicking on deployment assembling file, graphical service mounting plate is the API issue of the Restful of assembling file Become the service of Restful to service operation platform, Doc and the Mock document of corresponding Restful API is published to clothes simultaneously Business operation platform respective directories.
In one more preferably embodiment, the described method judging existing business function had been issued Restful services api interface, particularly as follows:
Judge whether that the doc being correlated with describes document.
In one more preferably embodiment, described component bag is the physical location comprising certain function logic, described Component bag include all dependence resources of realizing business function.
In one more preferably embodiment, described step (1-5) comprises the following steps:
(1-5-1) from explorer, the realization of existing business function is pulled in visual editor;
(1-5-2) method in realizing business function checks one by one, it is judged that in the parameter of the method and return value Whether include complex data type, if it is, continue step (1-5-3), otherwise continue step (1-6);
(1-5-3) judge incoming parameter or return whether data contain List, Map or Javabean complex data type, If it is, continue step (1-5-4), otherwise continue step (1-5-5);
(1-5-4) the concrete data type of the element deposited in configuration complex data type, continues step (1-6);
(1-5-5) ejecting service assembling guide, in guide, title and the Restful api interface of input link describes letter Breath.
In a kind of further embodiment, described Restful api interface describes information and includes url, description Word, request type, incoming parameter, return form and return JSON.
In one more preferably embodiment, described step (1-6) comprises the steps:
(1-6-1) it is compiled newly-generated component checking, it may be judged whether there is compile error, if it is, continue Step (1-6-2), otherwise continues step (1-6-3);
(1-6-2) prompting user is modified, and continues step (1-7);
(1-6-3) clicking on preservation installation diagram file, the doc generating Restful API describes document.
In a kind of further embodiment, described compile error includes explaining tag error and interface describes mistake By mistake.
In one more preferably embodiment, described step (1-8) comprises the steps:
(1-8-1) new projects are set up;
(1-8-2) the component bag that right click is newly-generated, ejects and disposes button;
(1-8-3) clicking on deployment button, the API of the Restful of assembling file is published to service operation platform and becomes The service of Restful.
In a kind of further embodiment, described new projects include that this is towards in micro services framework applications system Realize the framework that the service operation Mock of Restful service release quickly is relied on Doc platform.
In a kind of further embodiment, the API of the Restful of described assembling file is published to service operation Platform becomes the service of Restful, particularly as follows:
Doc Yu Mock file is cloned under the respective directories of the new projects described in deployment, completes deployment operation.
In one preferably embodiment, described step (2) comprises the following steps:
(2-1) server of service operation Mock and Doc platform is started;
(2-2) by the address of the server described in browser access, check that the api interface of Restful describes information;
(2-3) describe information according to the api interface of Restful, carry out the Mock test of API.
In one more preferably embodiment, described description information includes url, descriptive text, request type, incoming ginseng Number, return form and return JSON.
In a kind of further embodiment, described request type includes GET, POST, PUT and DELETE.
In a kind of further embodiment, described step (2-2) comprises the steps:
(2-2-1) inquiry startup of server port information and url chained address;
(2-2-2) by described in browser access step url chained address, check all Restful issued API list, by the Restful API summary info that described url inquiry is corresponding;
(2-2-3) summary info of the Restful API described in click, checks the description information of Restful API.
In one more preferably embodiment, described step (2-3) comprises the steps:
(2-3-1) according to the details descriptive text of Restful API, the data of correspondence are filled according to Mock data Carry out http to call, and return corresponding data;
(2-3-2) judge to return result the most correct, if it is, end step, otherwise continue step (2-3-4)
(2-3-4) according to information, debugging is carried out until return result is correct.
In a kind of further embodiment, described judgement returns result, particularly as follows:
The Schema of the data form of return and data with Restful API definition is compared, it is judged that return result The most correct.
Under micro services environment, all are all regarded as resource, and Restful is the most most popular framework style.Due to Lightweight and directly transmit the characteristic of data by HTTP, the Restful method of Web service has become as modal replacement Method.(such as java applet, Perl, Ruby, Python, PHP and Java Script [includes can to use various language Ajax]) realize client.Restful Web service generally can be by automatic client end or the application program visit representing user Ask.But, the Javabean existed is not because using Restful framework, it is impossible to carry out sending out of Restful API Cloth, enterprise faces this problem and often original system can only be developed again, faces the difficulty of cost and technology.
We provide a kind of pattern technology, pack for bottom, and user can be the most square by pattern technology Just the Javabean that any one is common is issued into Restful API.This technology can be greatly improved between micro services system Integrated efficiency, allows service logic can be issued as Restful service quickly, intuitively, substantially increases development efficiency and old System cost free becomes micro services system, it is simple to business event framework makes the transition to micro services framework, general unit EOS product Restful service is issued assembly and is based on the realization of this technology.
JSON (Java Script Object Notation) is the data interchange format of a kind of lightweight.It based on One subset of ECMAScript.JSON uses the text formatting being totally independent of language, but also using and be similar to C language The custom (including C, C++, C#, Java, Java Script, Perl, Python etc.) of family.These characteristics make JSON become reason The data interchange language thought.It is prone to people read and write, is also easy to machine simultaneously and resolves and generate, promote network transmission speed simultaneously Rate, just enables the characteristic existed due to JSON well be combined with Restful, so this case study on implementation selects JSON Form.
In the middle of actually used, refer to shown in Fig. 3 to Fig. 7, should realize in micro services framework applications system The method of Restful service release quickly, including graphically servicing mounting plate and service operation Mock and Doc platform.Wherein Patterned service mounting plate includes graphically assembling, and compiling checks and quickly creates a new component and (includes externally Restful api interface and realization);Service operation Mock and Doc platform include service operation Platform Server, component The Doc file of Restful API and the Mock file of the Restful API of component, refer to Fig. 3 system allomeric function module and show Shown in being intended to.
The component bag being somebody's turn to do realize in the method for Restful service release quickly in micro services framework applications system refers to Comprise the physical location of certain function logic, and each component bag is deployed to service-oriented as a minimum deployment unit Framework runs in system environments, comprises all dependence resources realizing business function under component bag.
Described graphical assembling Restful services and service Doc Yu Mock runs such as Fig. 4 allomeric function flow chart institute Show, comprise the following steps:
(1) judge whether business function exists the Doc of Restful and describe file;
(2) if step (1) describes Doc file and do not exists, the most newly-built component bag, newly-built installation diagram file;
(3) pull the realization of existing business function in installation diagram, a component will be generated in installation diagram.
(4) component for generating adds one or more services, and the interface of specified services describes, subsequently into step (6);
(5) if step (1) describes Doc file and do not exists, then the Restful service that there is correspondence on amendment component is relevant Information;
(6) preserving installation diagram file, installation diagram file can be compiled checking by system, and generates correspondence Restful APIDoc file;
(7) create or revise correspondence Restful service api interface Mock data file in Mock data;
(8) click on deployment, Doc and the Mock file of Restful API under component is cloned in new projects;
(9) server at grassroot project place is started;
(10) by browser access item address, the description information of Restful API is checked by the module of the inside;
(11) by browser access item address, the Mock being carried out Restful API by the module of the inside is tested, and tests Demonstrate,prove its correctness.
Complete the service assembling schematic diagram after service assembling as shown in Figure 5.
The process that shown service Mock runs as shown in Figure 6, comprises the following steps:
(1) server at grassroot project place is started;
(2) by browser access item address, the service list of Restful API can be viewed;
(3) inquire the Restful API of new issue according to url, carry out Restful API's by the module of the inside Mock tests, and verifies its correctness (the JSON form of return compares) with the schema of Restful API.
Shown in the Restful API Calls request process issued of external call as it is shown in fig. 7, comprises following steps:
(1) client initiates the Restful call request of http;
(2) mate according to url, find the Restful api interface that service end is corresponding;
(3) by interface find correspondence realize class;
(4) realize class and can be transferred to operation system logic function code, and return business function data;
(5) Restful component service is finally had to return the data of JSON form to client.
Through above step, develop and issue Restful API function and be fully completed, therefrom can draw and have employed this Bright business application system realizes the Restful API release quickly method of micro services framework so that develop and issue Restful becomes abnormal simple, and development efficiency is greatly improved, simultaneously by patterned exploitation and published method so that use Family need not too many understanding to the details of Restful, reduces study and the cost safeguarded, enters especially by for bottom Row packaging, user can issue into Restful by any one common Javabean of simple and convenient of pattern technology API;The method using the present invention can be issued as Restful service quickly, intuitively by existing business function, is greatly improved Integrated efficiency between application system, substantially increases development efficiency and legacy system cost free becomes micro services system, and Stable and reliable working performance, the scope of application are relatively broad, it is simple to business event framework makes the transition to micro services framework.
Have employed the method realizing Restful service release quickly based on micro services framework in this invention, due to wherein There is provided a visual Restful API service assembly tool in development period, visual pattern, generate fast and easily Restful API assembles file, packs especially by for bottom, and user can be simple and convenient by pattern technology The Javabean that any one is common is issued into Restful API;Meanwhile, by service operation Mock and Doc platform, permissible Document and each Restful API information by Doc inquiry API (comprise url, descriptive text, request type, incoming ginseng Number, returns form, returns the information such as JSON), each Restful API service can be tested by Mock, thus reach dynamic, Release quickly Restful service and Restful API service document description (Doc) with test (Mock) ability, greatly Improve the integrated efficiency between micro services application system, allow service logic can be issued as Restful clothes quickly, intuitively Business, so that it is more directly perceived, simple and efficient, stable and reliable for performance, reduce the cost that exploitation is safeguarded;Use this simultaneously Bright method can be issued as Restful service quickly, intuitively by existing business function, substantially increases between application system Integrated efficiency, substantially increase development efficiency and legacy system cost free become micro services system, and stable work in work Reliably, the scope of application relatively broad, solid foundation has been established in the further development for operation system micro services software engineering.
In this description, the present invention is described with reference to its specific embodiment.But it is clear that still may be made that Various modifications and alterations are without departing from the spirit and scope of the present invention.Therefore, specification and drawings is considered as illustrative And it is nonrestrictive.

Claims (17)

1. the method realizing Restful service release quickly based on micro services framework, it is characterised in that described method bag Include following steps:
(1) it is patterned service assembling to process;
(2) service operation process is carried out.
The method realizing Restful service release quickly based on micro services framework the most according to claim 1, its feature exists In, described step (1) comprises the steps:
(1-1) judge that the method for existing business function had been issued Restful and serviced api interface, if it is, continue Step (1-5), otherwise continues step (1-2);
(1-2) newly-built component bag;
(1-3) in this newly-built component bag, installation diagram file is created;
(1-4) according to the operation of user, the realization of existing business function is dragged in installation diagram, generates one or more The api interface of Restful and relevant doc describe document, continue step (1-6);
(1-5) user's click function list diagram, the api interface and the relevant doc that revise one or more Restful describe Document;
(1-6) keep installation diagram file, and be compiled checking to this installation diagram file by towards micro services framework applications system, The doc generating Restful API describes document;
(1-7) create or revise in described component bag in the Mock data file of Restful service api interface of correspondence Mock data;
(1-8) clicking on deployment assembling file, graphical service mounting plate is published to the API of the Restful of assembling file to take Business operation platform becomes the service of Restful, Doc and the Mock document of corresponding Restful API is published to service fortune simultaneously Row platform respective directories.
The method realizing Restful service release quickly based on micro services framework the most according to claim 2, its feature exists In, the described method judging existing business function had been issued Restful and had been serviced api interface, particularly as follows:
Judge whether that the doc being correlated with describes document.
The method realizing Restful service release quickly based on micro services framework the most according to claim 2, its feature exists In, described component bag is the physical location comprising certain function logic, and described component bag includes the institute realizing business function There is dependence resource.
The method realizing Restful service release quickly based on micro services framework the most according to claim 2, its feature exists In, described step (1-5) comprises the following steps:
(1-5-1) from explorer, the realization of existing business function is pulled in visual editor;
(1-5-2) whether the method in realizing business function checks one by one, it is judged that in the parameter of the method and return value Include complex data type, if it is, continue step (1-5-3), otherwise continue step (1-6);
(1-5-3) judge incoming parameter or return whether data contain List, Map or Javabean complex data type, if It is then to continue step (1-5-4), otherwise continues step (1-5-5);
(1-5-4) the concrete data type of the element deposited in configuration complex data type, continues step (1-6);
(1-5-5) ejecting service assembling guide, in guide, title and the Restful api interface of input link describes information.
The method realizing Restful service release quickly based on micro services framework the most according to claim 5, its feature exists In, described Restful api interface describe information include url, descriptive text, request type, incoming parameter, return form and Return JSON.
The method realizing Restful service release quickly based on micro services framework the most according to claim 2, its feature exists In, described step (1-6) comprises the steps:
(1-6-1) it is compiled newly-generated component checking, it may be judged whether there is compile error, if it is, continue step (1-6-2) step (1-6-3), is otherwise continued;
(1-6-2) prompting user is modified, and continues step (1-7);
(1-6-3) clicking on preservation installation diagram file, the doc generating Restful API describes document.
The method realizing Restful service release quickly based on micro services framework the most according to claim 7, its feature exists In, described compile error includes explaining tag error and interface describes mistake.
The method realizing Restful service release quickly based on micro services framework the most according to claim 2, its feature exists In, described step (1-8) comprises the steps:
(1-8-1) new projects are set up;
(1-8-2) the component bag that right click is newly-generated, ejects and disposes button;
(1-8-3) clicking on deployment button, the API of the Restful of assembling file is published to service operation platform and becomes Restful's Service.
The method realizing Restful service release quickly based on micro services framework the most according to claim 9, its feature Being, described new projects include that this is towards the service realizing Restful service release quickly in micro services framework applications system Run the framework that Mock Yu Doc platform is relied on.
11. methods realizing Restful service release quickly based on micro services framework according to claim 9, its feature Being, the API of the Restful of described assembling file is published to service operation platform and becomes the service of Restful, particularly as follows:
Doc Yu Mock file is cloned under the respective directories of the new projects described in deployment, completes deployment operation.
12. methods realizing Restful service release quickly based on micro services framework according to claim 1, its feature Being, described step (2) comprises the following steps:
(2-1) server of service operation Mock and Doc platform is started;
(2-2) by the address of the server described in browser access, check that the api interface of Restful describes information;
(2-3) describe information according to the api interface of Restful, carry out the Mock test of API.
13. methods realizing Restful service release quickly based on micro services framework according to claim 12, its feature Being, described description information includes url, descriptive text, request type, incoming parameter, returns form and return JSON.
14. methods realizing Restful service release quickly based on micro services framework according to claim 13, its feature Being, described request type includes GET, POST, PUT and DELETE.
15. methods realizing Restful service release quickly based on micro services framework according to claim 13, its feature Being, described step (2-2) comprises the steps:
(2-2-1) inquiry startup of server port information and url chained address;
(2-2-2) by described in browser access step url chained address, check all Restful API issued List, by the Restful API summary info that described url inquiry is corresponding;
(2-2-3) summary info of the Restful API described in click, checks the description information of Restful API.
16. methods realizing Restful service release quickly based on micro services framework according to claim 12, its feature Being, described step (2-3) comprises the steps:
(2-3-1) according to the details descriptive text of Restful API, the data filling in correspondence according to Mock data are carried out Http calls, and returns corresponding data;
(2-3-2) judge to return result the most correct, if it is, end step, otherwise continue step (2-3-4)
(2-3-4) according to information, debugging is carried out until return result is correct.
17. methods realizing Restful service release quickly based on micro services framework according to claim 16, its feature Being, described judgement returns result, particularly as follows:
The Schema of the data form of return and data with Restful API definition is compared, it is judged that whether return result Correctly.
CN201610571562.0A 2016-07-20 2016-07-20 The method for realizing Restful service release quickly based on micro services framework Active CN106254423B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610571562.0A CN106254423B (en) 2016-07-20 2016-07-20 The method for realizing Restful service release quickly based on micro services framework

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610571562.0A CN106254423B (en) 2016-07-20 2016-07-20 The method for realizing Restful service release quickly based on micro services framework

Publications (2)

Publication Number Publication Date
CN106254423A true CN106254423A (en) 2016-12-21
CN106254423B CN106254423B (en) 2019-06-28

Family

ID=57614019

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610571562.0A Active CN106254423B (en) 2016-07-20 2016-07-20 The method for realizing Restful service release quickly based on micro services framework

Country Status (1)

Country Link
CN (1) CN106254423B (en)

Cited By (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107104846A (en) * 2017-06-02 2017-08-29 北京北信源软件股份有限公司 A kind of method for realizing resource distribution, device and resource distribution center
CN107341008A (en) * 2017-06-22 2017-11-10 上海艾融软件股份有限公司 Micro services gray scale dissemination method
CN107730125A (en) * 2017-10-20 2018-02-23 南方电网科学研究院有限责任公司 Design of Laboratory Management System
CN108011768A (en) * 2017-12-26 2018-05-08 杭州电子科技大学 A kind of aop intercept types HBase data store micro services framework construction method
CN108337106A (en) * 2017-12-18 2018-07-27 海尔优家智能科技(北京)有限公司 Construction method, platform and the computer equipment of Internet of Things micro services system architecture
CN108388519A (en) * 2018-03-19 2018-08-10 车智互联(北京)科技有限公司 Mock test methods based on SpringBoot services
CN108563426A (en) * 2018-03-06 2018-09-21 北京酷我科技有限公司 A kind of iOS requests simulation strategy
CN108600255A (en) * 2018-05-07 2018-09-28 平安普惠企业管理有限公司 Mock service management method, device, computer equipment and storage medium
CN109032567A (en) * 2018-07-06 2018-12-18 航天星图科技(北京)有限公司 Service development and operation method and its model in a kind of micro services environment
CN109522094A (en) * 2018-11-20 2019-03-26 郑州云海信息技术有限公司 A kind of software demonstration method, system and computer equipment
CN109618119A (en) * 2018-10-31 2019-04-12 视联动力信息技术股份有限公司 Method and device for business processing
CN109660626A (en) * 2018-12-29 2019-04-19 天翼电子商务有限公司 A kind of load-balancing method, system and load balancing monitoring client
CN109741176A (en) * 2018-12-28 2019-05-10 四川新网银行股份有限公司 A kind of distributed service under the financial scenario based on internet dispatches system
CN109783071A (en) * 2019-01-21 2019-05-21 浪潮软件集团有限公司 Government affairs rule design method and system based on Drools regulation engine
CN109918151A (en) * 2019-03-14 2019-06-21 佳都新太科技股份有限公司 Workflow implementing method, device, equipment and storage medium
CN110287438A (en) * 2019-06-19 2019-09-27 天津大学 A kind of service convergence method transboundary based on micro services framework
CN110347421A (en) * 2019-05-31 2019-10-18 上海芯与网络科技有限公司 A kind of graphical interface allocation engine based on micro services
CN110764752A (en) * 2019-11-08 2020-02-07 普元信息技术股份有限公司 System and method for realizing graphical service arrangement of Restful service based on micro-service architecture
WO2020088087A1 (en) * 2018-11-02 2020-05-07 易保网络技术(上海)有限公司 Method and device for testing application program interface (api)
CN111181805A (en) * 2019-12-25 2020-05-19 航天信息股份有限公司 Micro-service test baffle generation method and system based on test case
CN111198678A (en) * 2018-11-19 2020-05-26 贵州白山云科技股份有限公司 Method and device for generating GraphQL front-end operation interface
CN111221591A (en) * 2019-12-27 2020-06-02 中国建设银行股份有限公司 Method, system and medium for detecting availability of micro-service deployed based on Kubernetes
CN111309454A (en) * 2020-03-16 2020-06-19 普元信息技术股份有限公司 Method and system for realizing context sharing and management control of service arrangement data under micro-service architecture
CN112256351A (en) * 2020-10-26 2021-01-22 卫宁健康科技集团股份有限公司 Implementation method of Feign component, micro-service calling method and device
CN112417699A (en) * 2020-11-26 2021-02-26 中国科学院电子学研究所苏州研究院 Service capability-oriented structured description verification system and method thereof
CN112783551A (en) * 2021-01-21 2021-05-11 中信银行股份有限公司 Interface document generation method of micro-service framework, electronic equipment and storage medium
CN112799918A (en) * 2021-04-12 2021-05-14 北京三维天地科技股份有限公司 Management system of visual enterprise service bus based on lightweight microservice architecture
CN112948666A (en) * 2021-01-28 2021-06-11 浪潮云信息技术股份公司 Method for realizing database table data release as API service
CN113253980A (en) * 2021-03-05 2021-08-13 吉林烟草工业有限责任公司 Tobacco logistics platform design method, system, device and storage medium
CN114116730A (en) * 2022-01-21 2022-03-01 深圳微迅信息科技有限公司 Interface management method, device, equipment and storage medium
CN114648317A (en) * 2022-05-24 2022-06-21 智昌科技集团股份有限公司 Product supply regulation and control system and method based on micro-service architecture

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2234368A1 (en) * 2008-01-11 2010-09-29 ZTE Corporation Content delivery device and system, content-on-demand method and network architecture
CN101957758A (en) * 2010-10-14 2011-01-26 上海普元信息技术股份有限公司 Method for realizing rapid Web Service publishment in service oriented architecture application systems
CN105515759A (en) * 2015-11-27 2016-04-20 国网信息通信产业集团有限公司 Micro service registration method and micro service registration system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2234368A1 (en) * 2008-01-11 2010-09-29 ZTE Corporation Content delivery device and system, content-on-demand method and network architecture
CN101957758A (en) * 2010-10-14 2011-01-26 上海普元信息技术股份有限公司 Method for realizing rapid Web Service publishment in service oriented architecture application systems
CN105515759A (en) * 2015-11-27 2016-04-20 国网信息通信产业集团有限公司 Micro service registration method and micro service registration system

Cited By (45)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107104846A (en) * 2017-06-02 2017-08-29 北京北信源软件股份有限公司 A kind of method for realizing resource distribution, device and resource distribution center
CN107341008A (en) * 2017-06-22 2017-11-10 上海艾融软件股份有限公司 Micro services gray scale dissemination method
CN107730125A (en) * 2017-10-20 2018-02-23 南方电网科学研究院有限责任公司 Design of Laboratory Management System
CN108337106B (en) * 2017-12-18 2021-07-16 海尔优家智能科技(北京)有限公司 Construction method and platform of Internet of things micro-service system architecture and computer equipment
CN108337106A (en) * 2017-12-18 2018-07-27 海尔优家智能科技(北京)有限公司 Construction method, platform and the computer equipment of Internet of Things micro services system architecture
CN108011768A (en) * 2017-12-26 2018-05-08 杭州电子科技大学 A kind of aop intercept types HBase data store micro services framework construction method
CN108011768B (en) * 2017-12-26 2020-09-18 杭州电子科技大学 Construction method of aop interception type HBase data storage micro-service architecture
CN108563426A (en) * 2018-03-06 2018-09-21 北京酷我科技有限公司 A kind of iOS requests simulation strategy
CN108563426B (en) * 2018-03-06 2021-06-11 北京酷我科技有限公司 iOS request simulation method
CN108388519A (en) * 2018-03-19 2018-08-10 车智互联(北京)科技有限公司 Mock test methods based on SpringBoot services
CN108600255B (en) * 2018-05-07 2022-02-01 平安普惠企业管理有限公司 Mock service management method, device, computer equipment and storage medium
CN108600255A (en) * 2018-05-07 2018-09-28 平安普惠企业管理有限公司 Mock service management method, device, computer equipment and storage medium
CN109032567A (en) * 2018-07-06 2018-12-18 航天星图科技(北京)有限公司 Service development and operation method and its model in a kind of micro services environment
CN109032567B (en) * 2018-07-06 2021-08-10 中科星图股份有限公司 Service development and operation method and system in micro-service environment
CN109618119A (en) * 2018-10-31 2019-04-12 视联动力信息技术股份有限公司 Method and device for business processing
WO2020088087A1 (en) * 2018-11-02 2020-05-07 易保网络技术(上海)有限公司 Method and device for testing application program interface (api)
CN111198678A (en) * 2018-11-19 2020-05-26 贵州白山云科技股份有限公司 Method and device for generating GraphQL front-end operation interface
CN109522094A (en) * 2018-11-20 2019-03-26 郑州云海信息技术有限公司 A kind of software demonstration method, system and computer equipment
CN109741176B (en) * 2018-12-28 2021-04-27 四川新网银行股份有限公司 Distributed service scheduling system based on internet financial scene
CN109741176A (en) * 2018-12-28 2019-05-10 四川新网银行股份有限公司 A kind of distributed service under the financial scenario based on internet dispatches system
CN109660626A (en) * 2018-12-29 2019-04-19 天翼电子商务有限公司 A kind of load-balancing method, system and load balancing monitoring client
CN109783071A (en) * 2019-01-21 2019-05-21 浪潮软件集团有限公司 Government affairs rule design method and system based on Drools regulation engine
CN109783071B (en) * 2019-01-21 2022-03-29 浪潮软件股份有限公司 Drools rule engine-based government rule design method and system
CN109918151A (en) * 2019-03-14 2019-06-21 佳都新太科技股份有限公司 Workflow implementing method, device, equipment and storage medium
CN110347421A (en) * 2019-05-31 2019-10-18 上海芯与网络科技有限公司 A kind of graphical interface allocation engine based on micro services
CN110287438A (en) * 2019-06-19 2019-09-27 天津大学 A kind of service convergence method transboundary based on micro services framework
CN110764752B (en) * 2019-11-08 2023-06-16 普元信息技术股份有限公司 System and method for realizing graphic service arrangement of Restful service
CN110764752A (en) * 2019-11-08 2020-02-07 普元信息技术股份有限公司 System and method for realizing graphical service arrangement of Restful service based on micro-service architecture
CN111181805B (en) * 2019-12-25 2022-04-29 航天信息股份有限公司 Micro-service test baffle generation method and system based on test case
CN111181805A (en) * 2019-12-25 2020-05-19 航天信息股份有限公司 Micro-service test baffle generation method and system based on test case
CN111221591A (en) * 2019-12-27 2020-06-02 中国建设银行股份有限公司 Method, system and medium for detecting availability of micro-service deployed based on Kubernetes
CN111309454A (en) * 2020-03-16 2020-06-19 普元信息技术股份有限公司 Method and system for realizing context sharing and management control of service arrangement data under micro-service architecture
CN111309454B (en) * 2020-03-16 2024-02-20 普元信息技术股份有限公司 Method and system for realizing service arrangement data context sharing and management control under micro-service architecture
CN112256351A (en) * 2020-10-26 2021-01-22 卫宁健康科技集团股份有限公司 Implementation method of Feign component, micro-service calling method and device
CN112256351B (en) * 2020-10-26 2023-11-17 卫宁健康科技集团股份有限公司 Method for realizing Feign component, method and device for calling micro-service
CN112417699A (en) * 2020-11-26 2021-02-26 中国科学院电子学研究所苏州研究院 Service capability-oriented structured description verification system and method thereof
CN112783551A (en) * 2021-01-21 2021-05-11 中信银行股份有限公司 Interface document generation method of micro-service framework, electronic equipment and storage medium
CN112948666A (en) * 2021-01-28 2021-06-11 浪潮云信息技术股份公司 Method for realizing database table data release as API service
CN113253980A (en) * 2021-03-05 2021-08-13 吉林烟草工业有限责任公司 Tobacco logistics platform design method, system, device and storage medium
CN112799918B (en) * 2021-04-12 2021-08-24 北京三维天地科技股份有限公司 Management system of visual enterprise service bus based on lightweight microservice architecture
CN112799918A (en) * 2021-04-12 2021-05-14 北京三维天地科技股份有限公司 Management system of visual enterprise service bus based on lightweight microservice architecture
CN114116730B (en) * 2022-01-21 2022-04-12 深圳微迅信息科技有限公司 Interface management method, device, equipment and storage medium
CN114116730A (en) * 2022-01-21 2022-03-01 深圳微迅信息科技有限公司 Interface management method, device, equipment and storage medium
CN114648317B (en) * 2022-05-24 2022-09-13 智昌科技集团股份有限公司 Product supply regulation and control system and method based on micro-service architecture
CN114648317A (en) * 2022-05-24 2022-06-21 智昌科技集团股份有限公司 Product supply regulation and control system and method based on micro-service architecture

Also Published As

Publication number Publication date
CN106254423B (en) 2019-06-28

Similar Documents

Publication Publication Date Title
CN106254423B (en) The method for realizing Restful service release quickly based on micro services framework
US11561774B2 (en) Composition of pattern-driven reactions in real-time dataflow programming
US7676786B2 (en) System and method and apparatus for using UML tools for defining web service bound component applications
US8443035B2 (en) System and method for collaboration using web browsers
Webber et al. REST in practice: Hypermedia and systems architecture
Indrasiri et al. gRPC: up and running: building cloud native applications with Go and Java for Docker and Kubernetes
US9721246B2 (en) Synchronization patterns for mobile applications
CA2498540C (en) System and method for building wireless applications with intelligent mapping between user interface and data components
US8108830B2 (en) System and method for building wireless applications with intelligent mapping between user interface and data components
EP1901181B1 (en) Discovery Web Service
JP5265549B2 (en) Consolidated Discovery Web Service
US20080282222A1 (en) Xml push and remote execution of a wireless applications
US10007532B1 (en) Data infrastructure for cross-platform cross-device API inter-connectivity
WO2002019131A1 (en) System and method for collaboration using web browsers
WO2014026169A2 (en) Application development system and method for object models and datagraphs in client-side and server-side applications
JP2011086291A (en) System landscape-compatible inter-application communication infrastructure
US20130275623A1 (en) Deployment of web application archives as a preprocessing step for provisioning
US20190250962A1 (en) Method for updating instance-based message maps using metadata
CA2538561C (en) System and method for conversion of web services applications into component based applications for devices
CN113918637A (en) BPMN2.0 specification-based process engine platform creation method and system
US8972487B2 (en) Automated framework for testing enterprise services consumer technologies
Chis et al. BPMN extension for multi-protocol DataOrchestration
Yaici et al. A model-based approach for the generation of adaptive user interfaces on portable devices
Pohl et al. Developing Enterprise Services for SAP

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant