CN108446111A - A kind of micro services construction method based on Spring cloud - Google Patents

A kind of micro services construction method based on Spring cloud Download PDF

Info

Publication number
CN108446111A
CN108446111A CN201810250328.7A CN201810250328A CN108446111A CN 108446111 A CN108446111 A CN 108446111A CN 201810250328 A CN201810250328 A CN 201810250328A CN 108446111 A CN108446111 A CN 108446111A
Authority
CN
China
Prior art keywords
service
program
feign
configuration file
consumption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810250328.7A
Other languages
Chinese (zh)
Inventor
张才俊
李子乾
马永波
程飞飞
王清源
王乐之
孙晋龙
李伟东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Customer Service Center Of State Grid Corp Of China
Original Assignee
Customer Service Center Of State Grid Corp Of China
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 Customer Service Center Of State Grid Corp Of China filed Critical Customer Service Center Of State Grid Corp Of China
Priority to CN201810250328.7A priority Critical patent/CN108446111A/en
Publication of CN108446111A publication Critical patent/CN108446111A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages

Landscapes

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

Abstract

The present invention relates to a kind of micro services construction methods based on Spring cloud.It comprises the following processes:(1) male parent creates;(2) service discovery and registration;(3) ISP and service consumer;(4) service fusing;(5) configuration center;(6) API gateway is arranged;(7) distributed transaction coherency management;(8) Docker is used to build micro services.Using Spring Boot development and application micro services, and realize the function of service discovery, service consumption, service fusing, api gateways, unified configuration center, distributed transaction coherency management, container structure.

Description

A kind of micro services construction method based on Spring cloud
Technical field:
The present invention relates to presetting apparatus, further to a kind of micro services structure side based on Spring cloud Method.
Background technology:
First emphasis that micro services framework is emphasized is exactly that operation system needs thorough modularization and serviceization, original Single operation system can be split as it is multiple can be designed with stand-alone development, the small application of operation and O&M.Lead between these small applications The service of crossing is completed interactive and integrated.Each small application arrives control layer, logical layer, database access, database from front end web ui All it is entirely independent a set of.We are more suitable with small this word of application without component herein, each small application in addition to It completes outside the business function of itself itself, emphasis is exactly the service for also needing to consume external other application exposure, while itself The ability of itself is issued as servicing towards the outside.
For modularization, modular monomer applications, how by the application of a large amount of loose couplings carry out unitized management and How monitoring ensures the consistency of the mutual calling and distributing real time system between service, how to realize that service discovery is registered And configuration management, all it is that distributed structure/architecture unifies problems faced to micro services framework in other words.
Spring Boot are the completely new frames provided by Pivotal team, and purpose of design is for simplifying new Spring The initial of application is built and development process.It is an open source projects of the communities Spring publication, it is intended to help developer quick And simpler structure project.Most of SpringBoot projects only need seldom configuration file.The frame has used spy Fixed mode is configured, to make developer no longer need to define the configuration of stereotyping.
The effect of Spring Boot frames is very simple, it can be achieved that automatically configuring, and simply by the presence of corresponding jar packets, Spring is just It can automatically configure.If default configuration is unable to meet demand, it can also replace and automatically configure class, use other configurations.Separately Outside, Spring Boot are also integrated with Embedded Web server, and many useful functions such as system monitoring being capable of rapid build Enterprise and application program.
Spring Boot are developed based on Spring frames, also inherit the maturity of Spring.It passes through one A little built-in firmwares encapsulate the complexity of bottom frame, to help user to carry out the exploitation of micro services.Spring Boot's One big advantage is to improve the productivity of developer, because many general functions, such as RESTful HTTP have been provided in it And Embedded web applications.When program is run, therefore it is easy to be assembled and is used.On in many aspects, it is also one Kind of " micro- frame " allows developer to select in entire frame the part needed for them, huge or not without using It is relied on when necessary operation.This also allows Boot application programs that can be packaged as multiple junior units to be disposed, and the frame Frame can also use structure system generate can deployment file, such as the Java archive packet that can run.
As a micro services frame, a big chunk of Boot value be it can be seamlessly based on Maven and The project of Gradle provides various the build tools.By using Spring Boot plug-in units, it will be able to the ability of the frame is utilized, Deployment package that project is packaged as lightweight, can running, and in addition to this with little need for carrying out any additional match It sets.In addition, can also select the example using cumbersome Maven POM on the websites Spring Initializr, need simultaneously Tell the address of the startup class of application program to the plug-in unit.And be then not necessarily to carry out the configuration of this respect when using Gradle, because The address of this class can be inherently found for plug-in unit.
The shortcomings that prior art:Lack the peripheral scheme such as registration, discovery, lacks periphery monitoring Integrated Solution, lack periphery Safety management scheme lacks the URI programmes of REST landings.There is an urgent need for a kind of new micro services structures based on Spring cloud Construction method.
Invention content:
Using Spring Boot development and application micro services, and realize service discovery, service consumption, service fusing, api nets It closes, the function of unified configuration center, distributed transaction coherency management, container structure.Technical solution is as follows:
A kind of micro services construction method based on Spring cloud, comprises the following processes:
(1) male parent creates:Father's project is created, to be managed collectively to the Maven dependences in project, is added SpringBoot is relied on;
(2) service discovery and registration:A submodule for being used for service registration is built under parent project, in configuration text In part, the dependence about Eureka is added to create registration center's service;
@EnableEurekaServer ,@are explained in addition in the startup category code of registration center's engineering EnableEurekaClient directly runs the main methods of the startup class of the engineering, you can starts registration center's server-side;
In other services, service registration dependence is added first in the case where relying on configuration file, secondly in application master @EnableEurekaClient are explained in addition in class, then configuration information of the addition about service registration in configuration file, most Start service afterwards, EurekaClient can be automatically by service registration to EurekaServer;
(3) service consumption and load balancing are realized:Using RestTemplate consumption services, Ribbon or Feign is utilized It realizes service consumption, ensures load balancing;
(4) service fusing:Service fusing is realized using Hystrix;
(5) configuration center:
A submodule for being used for service registration is built under parent project, in configuration file, is added about Config Dependence to create configuration center service;
The work(explained@EnableConfigServer and explain open configuration server is added in the entrance class of modular program Energy;
Warehouse information is configured in the configuration file of program;
Configuration center is added in target program to rely on, and is added and is closed in its configuration file bootstrap.properties In configuration center relevant information;
Configuration center file content can be read after configuration successful in target program;
(6) API gateway is arranged:
A submodule for being used for gateway is built under parent project, in configuration file, adds the dependence about Zuul To create api gateway services;
@EnableZuulProxy are explained in addition in the startup class of modular program, open the function of zuul;
Gateway related content is added in configuration file;
(7) distributed transaction coherency management:
The Status Type of definition event;
When distributed transaction executes asynchronous operation, record in event information and state to ES;
Event is obtained from ES and generate action event stream using Reactor;
Flow of event is executed up to the state of the last one event generation is the end-state of event, return client;
(8) Docker is used to build micro services:Pom.xml texts in the micro services modular program for having been built up completion Docker is added in part to rely on, and is write DockerFile files and is executed the maven mirror images for creating docker mirror images.
One of preferably, in the realization service consumption and load-balancing step, first choice selection Eureka Server, its preferential selection is in the same Zone and loads less Server;The strategy specified according to user, from Server The service registration list got selects an address;The step of load balancing being realized with Ribbon:
Structure one under parent project is used for the submodule of service consumption, in configuration file, addition about The dependence of ribbon is to create service consumer;
In modular program starts class a bean is injected to the IOC of program using note@bean:restTemplate; The function of showing that this restRemplate opens load balancing is explained by explaining@LoadBalanced;
Write a service class for consumption service, by previous step inject the restTemplate of IOC containers come The interface of consumption target service provided;Program name that can be directly is instead of the specific addresses url, its meeting in ribbon Specific Service Instance is selected according to Service name, and clothes can be replaced with specific url when request according to Service Instance Business name;
It writes Controller classes and calls previous step service class, consumption target service.
Preferably two, in the realization service consumption and load-balancing step, creates interface and simultaneously add for interface It appends notes to and Feign can be used;The step of load balancing being realized with Feign:
One submodule for being used for service consumption of structure under parent project adds in configuration file about Feign Dependence to create service consumer;
In the startup class of modular program, in addition@EnableFeignClients explain the function of opening Feign;
A Feign interface is write, by@FeignClient (" Service name "), to specify the service specifically called;
Controller classes are write, externally the api interface of exposure one, the Feign clients defined by previous step The interface of offer carrys out consumption target service.
Preferably three, in the service blowing step, the blowing step of load balancing is realized with Ribbon:
The step of realizing load balancing with reference to Ribbon structure service consumer program consumes specified services, adds fuse It is relied on needed for Hystrix;
Addition explains@EnableHystrix and explains unlatching Hystrix fuse functions in the startup class of modular program;
It is explained plus@HystrixCommand in the method for the Service classes of consumption service;The note creates this method The function of fuse has been built, and has specified FallbackMethod blowout methods, blowout method can directly return a character String, is abnormal with alerting service, with fusing.
Preferably four, in the service blowing step, the blowing step of load balancing is realized with Feign:
Specified services are consumed with reference to the step of realizing load balancing structure service consumer program, add fuse It is relied on needed for Hystrix;
Feign is in Spring Cloud, not give tacit consent to opening from belt fuser;It needs to match in configuration file Set opening;The Feign.hystrix.enabled values in configuration file are changed, true is set as;
The specified class of fallback is added in the note of the interface comprising FeignClient;
The specified class for writing fallback realizes the interface for including FeignClient, and is injected into Ioc containers, can compile Fusing reminding method is write to be abnormal with alerting service.
Preferably five, in API gateway setting steps, filter is added in gateway program, to intercept Undesirable request or addition safety certification are filtered, to increase safety.
The progress of the present invention compared with the existing technology is:
Quickly failure may be implemented in fuse, if detecting many similar mistakes whithin a period of time, can force it Later multiple calling quickly fail, and do not visit again remote server.
Spring Cloud Config provide a kind of configuration server of externalizing in a distributed system and client It supports, the center of configuration server is used for managing the external attribute applied under all environment.After Config Server storages End acquiescence uses git storage configuration information, can be easy to support the version of label configuration surroundings, while can be wide with a use General tool management configures content;The same realization for supporting to add other storage modes.
API Gateway are parts indispensable in micro services framework.It can be unified to outside by API Gateway System, which provides, uses Zuul to provide dynamic routing, prison as API Gateway, Zuul in REST API, Spring Cloud Control retracts, peace congruous function;Zuul is not relying on Eureka, can be detached from Eureka operations.
There are many benefits using event processing state of tracing to the source in micro services framework:Polymerization is considered generation and appoints The coherency state of what object;It provides method of revising and is used for carrying out the history that replay generates state change in object;It can make There is provided analysis data many necessary inputs with flow of event;Compensation way can be taken to realize that event is returned to inconsistent application state Rolling;It also avoids the synchronization between complicated micro services, and the asynchronous non-blocking operation between micro services has paved road;Make It is polymerize with the processing for carrying out asynchronous operation of Reactor, then traces to the source data and operate, ensures final the one of operation affairs Asynchronous non-blocking operation between cause property and micro services.
It is that can be run inside independent process due to highlighting single component itself inside micro services framework, each group It can accomplish the isolation of process-level between part when deployment.So a server is several it may be desired to initialize Ten even more processes carry out the deployment of application component.In order to keep the isolation of process, we can use virtual machine, But work as tens processes all completely with independent virtual machine with regard to unpractical, and the solution of this problem is just exactly to utilize Light weight Docker containers inside PaaS platform do this thing, and each Docker is independent container just and accomplishes completely The isolation of process-level, resources occupation rate is again minimum, these features are just met for the exploitation test and automation of micro services framework Deployment.
Specific implementation mode:
Embodiment:
A kind of micro services construction method based on Spring cloud, comprises the following processes:
(1) male parent creates:Father's project is created, to be managed collectively to the Maven dependences in project, is added SpringBoot is relied on.
(2) service discovery and registration:
Service discovery is one of Key Principles in micro services framework, each client of manual configuration or some form of agreement It is more difficult and very fragile;The A and P (i.e. availability and subregion fault-tolerance) in CAP theories can be ensured using Eureka;
The step of specific service discovery and registration, is as follows:
A submodule for being used for service registration is built under parent project, in configuration file, is added about Eureka Dependence with create registration center service;@is explained in addition in the startup category code of registration center's engineering EnableEurekaServer ,@EnableEurekaClient directly run the main methods of the startup class of the engineering, you can Start registration center's server-side;In other services, service registration dependence is added first in the case where relying on configuration file, is secondly existed @EnableEurekaClient are explained in addition in application main classes, are then added about service registration in configuration file Configuration information, finally start service, EurekaClient can be automatically by service registration to EurekaServer;Open registration The port address of center service can be observed to register online Service Instance.
(3) service consumption and load balancing are realized:
Using RestTemplate consumption services (such as Http tools of HttpClient etc), under cluster environment The multiple examples of each service arrangement, the load balancing of service consumer consumption service supplier is realized using Ribbon or Feign.
Ribbon:Ribbon is a client load balanced device, and operation is on the client.It is one and have passed through high in the clouds The libraries IPC of test can control some behaviors of HTTP and TCP Client well;Feign is default to be used Ribbon;
Ribbon work is divided into two steps:Eureka Server are selected, its preferential selection is in the same Zone and loads less Server;The strategy specified according to user selects an address in the service registration list got from Server;
The step of load balancing being realized with Ribbon:One submodule for being used for service consumption of structure under parent project Block, in configuration file, adding the dependence about ribbon, (service consumer also needs to defer to service hair to create service consumer Service is found in the registration of the step of existing registration service);
In modular program starts class a bean is injected to the IOC of program using note@bean:RestTemplate, The function of showing that this restRemplate opens load balancing is explained by explaining@LoadBalanced;
Write a service class for consumption service, by previous step inject the restTemplate of IOC containers come The interface of consumption target service provided;Program name that can be directly is instead of the specific addresses url, its meeting in ribbon Specific Service Instance is selected according to Service name, and clothes can be replaced with specific url when request according to Service Instance Business name;
It writes Controller classes and calls previous step service class, consumption target service.
Feign:Feign is the web service clients of a statement formula, it to write web service clients End is more prone to, and it is that Feign can be used to create interface and explained for interface addition.Feign can use Feign notes or JAX- RS is explained, and also supports the encoder and decoder of hot plug.Spring Cloud are the note that Feign is added to Spring MVC It supports, and integrates Eureka and Ribbon and load balancing is provided.The step of load balancing being realized with Feign:
One submodule for being used for service consumption of structure under parent project adds in configuration file about feign Dependence to create service consumer (service consumer, which also needs to defer to, to be found to service in the registration of service discovery registration service);
In the startup class of modular program, in addition@EnableFeignClients explain the function of opening Feign;
A feign interface is write, by@FeignClient (" Service name "), to specify the service specifically called;
Controller classes are write, externally the api interface of exposure one, the Feign clients defined by previous step The interface of offer carrys out consumption target service.
(4) service fusing:
It usually has multiple service layers in micro services framework to call, the failure of infrastructure service may result in cascade event Barrier, and then cause whole system unavailable, this phenomenon is known as avalanche effect, to avoid avalanche effect, is come using Hystrix real Existing fuse.Quickly failure may be implemented in fuse, if detecting many similar mistakes whithin a period of time, can force it Later multiple calling quickly fail, and do not visit again remote server.Fuse can also use application program diagnostic error be No to be corrected, if having been corrected, application program can attempt call operation again.The fusing step of load balancing is realized with Ribbon Suddenly:
The step of realizing load balancing with reference to Ribbon structure service consumer program consumes specified services, adds fuse It is relied on needed for Hystrix;
Addition explains@EnableHystrix and explains unlatching Hystrix fuse functions in the startup class of modular program;
It is explained plus@HystrixCommand in the method for the Service classes of consumption service.The note creates this method The function of fuse has been built, and has specified fallbackMethod blowout methods, blowout method can directly return a character String, is abnormal with alerting service, with fusing.
The blowing step of load balancing is realized with Feign:
Specified services are consumed with reference to the step of realizing load balancing structure service consumer program, add fuse It is relied on needed for Hystrix;
Feign is in Spring Cloud, not give tacit consent to opening from belt fuser.It needs to match in configuration file Set opening.The feign.hystrix.enabled values in configuration file are changed, true is set as;
The specified class of fallback is added in the note of the interface comprising FeignClient;
The specified class for writing fallback realizes the interface for including FeignClient, and is injected into Ioc containers, can compile Fusing reminding method is write to be abnormal with alerting service.
(5) configuration center:
The step of configuration center being realized with Config:
A submodule for being used for service registration is built under parent project, in configuration file, is added about Config Dependence to create configuration center service;
The work(explained@EnableConfigServer and explain open configuration server is added in the entrance class of modular program Energy;
Configuration configuration warehouse information, specific as follows in the configuration file of program:
Spring.application.name=config-server
Server.port=8888
Spring.cloud.config.server.git.uri=https://github.com/forezp/ SpringcloudConfig/
Spring.cloud.config.server.git.searchPaths=respo
Spring.cloud.config.label=master
Spring.cloud.config.server.git.username=your username
Spring.cloud.config.server.git.password=your password
Configuration center is added in target program to rely on, and is added and is closed in its configuration file bootstrap.properties In configuration center relevant information;
Configuration center file content can be read after configuration successful in target program.
(6) API gateway
API Gateway are parts indispensable in micro services framework;It can be unified to outside by API Gateway System, which provides, uses Zuul to provide dynamic routing, prison as API Gateway, Zuul in REST API, Spring Cloud Control retracts, peace congruous function;Zuul is not relying on Eureka, can be detached from Eureka operations.Zuul realizes the step of api gateways Suddenly:
Structure one under parent project is used for the submodule of gateway, in configuration file, addition about Zuul according to It relies and creates api gateway services (service consumer, which also needs to defer to, finds service in the registration of service discovery registration service);
@EnableZuulProxy are explained in addition in the startup class of modular program, open the function of zuul;
Gateway related content is added in configuration file, format is such as:
If being intended to realize service filtering, filter can be directly added in gateway program, it is undesirable to intercept filtering Request or addition safety certification, to increase safety.
(7) distributed transaction coherency management:
When establishing micro services, we are forced to the final consistency problem in face of configuration state, this is because each micro- Service all one's own database resources of particular exposed, each database is according to the different consistency of oneself type configuration Weigh strategy with high availability.
Event sourcing (event is traced to the source) are a kind of lasting data modes for using for reference database transaction log, in ES In, transaction units become more fine granularity, and the domain model shape of storage in the database is represented using a series of orderly events State, once an event is added into event log, it cannot be removed or resequence, event be considered as it is immutable, Sequence of events can only be added mode and store.
The step of distributed transaction consistency being realized with Reactor:
The Status Type of definition event;
When distributed transaction executes asynchronous operation, record in event information and state to ES that (repository of standard is Apache Kafka);
Event is obtained from ES and just generate action event stream using Reactor;
Flow of event is executed up to the state of the last one event generation is the end-state of event, return client.
(8) Docker is used to build micro services:
Middle addition docker is relied in pom.xml files in the micro services modular program for having been built up completion, Program is as follows:
It writes DockerFile files and executes the maven mirror images for creating docker mirror images.

Claims (6)

1. a kind of micro services construction method based on Spring cloud, which is characterized in that comprise the following processes:
(1) male parent creates:Father's project is created, to be managed collectively to the Maven dependences in project, is added SpringBoot is relied on;
(2) service discovery and registration:A submodule for being used for service registration is built under parent project, in configuration file, The dependence about Eureka is added to create registration center's service;
@EnableEurekaServer ,@are explained in addition in the startup category code of registration center's engineering EnableEurekaClient directly runs the main methods of the startup class of the engineering, you can starts registration center's server-side;
In other services, service registration dependence is added first in the case where relying on configuration file, secondly in application main classes @EnableEurekaClient are explained in addition, and then configuration information of the addition about service registration in configuration file, is finally opened Dynamic service, EurekaClient can be automatically by service registration to EurekaServer;
(3) service consumption and load balancing are realized:Using RestTemplate consumption services, realized using Ribbon or Feign Service consumption ensures load balancing;
(4) service fusing:Service fusing is realized using Hystrix;
(5) configuration center:
Under parent project build one be used for service registration submodule, in configuration file, addition about Config according to It relies and creates configuration center service;
The function of explaining@EnableConfigServer and explain open configuration server is added in the entrance class of modular program;
Warehouse information is configured in the configuration file of program;
In target program add configuration center rely on, in its configuration file bootstrap.properties addition about with Set center relevant information;
Configuration center file content can be read after configuration successful in target program;
(6) API gateway is arranged:
A submodule for being used for gateway is built under parent project, in configuration file, adds the dependence about Zuul to create Build api gateway services;
@EnableZuulProxy are explained in addition in the startup class of modular program, open the function of zuul;
Gateway related content is added in configuration file;
(7) distributed transaction coherency management:
The Status Type of definition event;
When distributed transaction executes asynchronous operation, record in event information and state to ES;
Event is obtained from ES and generate action event stream using Reactor;
Flow of event is executed up to the state of the last one event generation is the end-state of event, return client;
(8) Docker is used to build micro services:In pom.xml files in the micro services modular program for having been built up completion It adds docker to rely on, write DockerFile files and executes the maven mirror images for creating docker mirror images.
2. a kind of micro services construction method based on Spring cloud according to claim 1, which is characterized in that the reality In existing service consumption and load-balancing step, first choice selection Eureka Server, its preferential selection is in the same Zone and load Less Server;The strategy specified according to user, the service registration list got from Server select an address;With Ribbon realizes the step of load balancing:
One submodule for being used for service consumption of structure under parent project adds in configuration file about ribbon's It relies on to create service consumer;
In modular program starts class a bean is injected to the IOC of program using note@bean:restTemplate;Pass through It explains@LoadBalanced and explains the function of showing that this restRemplate opens load balancing;
A service class for consumption service is write, the restTemplate of IOC containers is injected by previous step to consume The interface of destination service provided;Program name that can be directly is instead of the specific addresses url, it can basis in ribbon Service name selects specific Service Instance, and Service name can be replaced with specific url when request according to Service Instance;
It writes Controller classes and calls previous step service class, consumption target service.
3. a kind of micro services construction method based on Spring cloud according to claim 1, which is characterized in that the reality In existing service consumption and load-balancing step, creates interface and Feign can be used for interface addition note;With Feign realities The step of existing load balancing:
Structure one under parent project is used for the submodule of service consumption, in configuration file, addition about Feign according to It relies and creates service consumer;
In the startup class of modular program, in addition@EnableFeignClients explain the function of opening Feign;
A Feign interface is write, by@FeignClient (" Service name "), to specify the service specifically called;
Controller classes are write, externally the api interface of exposure one, is provided by the Feign clients that previous step defines Interface carry out consumption target service.
4. a kind of micro services construction method based on Spring cloud according to claim 1, which is characterized in that the clothes It is engaged in blowing step, the blowing step of load balancing is realized with Ribbon:
The step of realizing load balancing with reference to Ribbon structure service consumer program consumes specified services, adds fuse It is relied on needed for Hystrix;
Addition explains@EnableHystrix and explains unlatching Hystrix fuse functions in the startup class of modular program;
It is explained plus@HystrixCommand in the method for the Service classes of consumption service;The note creates this method The function of fuse, and FallbackMethod blowout methods are specified, blowout method can directly return a character string, with Alerting service is abnormal, with fusing.
5. a kind of micro services construction method based on Spring cloud according to claim 1, which is characterized in that the clothes It is engaged in blowing step, the blowing step of load balancing is realized with Feign:
Specified services, addition fuse Hystrix institutes are consumed with reference to the step of realizing load balancing structure service consumer program It needs to rely on;
Feign is in Spring Cloud, not give tacit consent to opening from belt fuser;It needs to configure in configuration file and beat It opens;The Feign.hystrix.enabled values in configuration file are changed, true is set as;
The specified class of fallback is added in the note of the interface comprising FeignClient;
The specified class for writing fallback realizes the interface for including FeignClient, and is injected into Ioc containers, can write molten Disconnected reminding method is abnormal with alerting service.
6. a kind of micro services construction method based on Spring cloud according to claim 1, which is characterized in that in API In gateway setting steps, filter is added in gateway program, to intercept the undesirable request of filtering or addition safety Certification, to increase safety.
CN201810250328.7A 2018-03-26 2018-03-26 A kind of micro services construction method based on Spring cloud Pending CN108446111A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810250328.7A CN108446111A (en) 2018-03-26 2018-03-26 A kind of micro services construction method based on Spring cloud

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810250328.7A CN108446111A (en) 2018-03-26 2018-03-26 A kind of micro services construction method based on Spring cloud

Publications (1)

Publication Number Publication Date
CN108446111A true CN108446111A (en) 2018-08-24

Family

ID=63196536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810250328.7A Pending CN108446111A (en) 2018-03-26 2018-03-26 A kind of micro services construction method based on Spring cloud

Country Status (1)

Country Link
CN (1) CN108446111A (en)

Cited By (54)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240765A (en) * 2018-08-28 2019-01-18 中国联合网络通信集团有限公司 Blowout method, device, equipment and the computer readable storage medium of Service Source
CN109271291A (en) * 2018-09-04 2019-01-25 山东浪潮通软信息科技有限公司 A kind of service monitoring and the method for management
CN109379430A (en) * 2018-11-30 2019-02-22 四川芯波智创物联技术有限公司 A kind of shared platform that is full of altogether of " Internet of Things+" industry ecosphere
CN109491792A (en) * 2018-11-13 2019-03-19 北京车和家信息技术有限公司 A kind of page backing method, device and gateway
CN109587272A (en) * 2018-12-30 2019-04-05 深圳云天励飞技术有限公司 A kind of optimization method of micro services, device and electronic equipment
CN109597610A (en) * 2018-12-10 2019-04-09 南京华苏科技有限公司 A kind of application structure modularization construction method based on micro services framework
CN109614553A (en) * 2018-12-21 2019-04-12 北京博明信德科技有限公司 PaaS platform for log collection
CN109634657A (en) * 2018-12-14 2019-04-16 武汉烽火信息集成技术有限公司 A kind of micro services are packaged dispositions method and system
CN109634616A (en) * 2018-12-21 2019-04-16 北京博明信德科技有限公司 The PaaS platform fast disposed
CN109670952A (en) * 2018-12-12 2019-04-23 中国对外经济贸易信托有限公司 One kind, which is withheld, pays transaction platform
CN109671140A (en) * 2018-12-26 2019-04-23 江苏赞奇科技股份有限公司 A kind of cloud rendering service processing method using micro services
CN109684820A (en) * 2018-12-28 2019-04-26 天津卓朗科技发展有限公司 Service Privileges acquisition methods, device and electronic equipment
CN109683957A (en) * 2018-11-28 2019-04-26 厦门中控智慧信息技术有限公司 The method and apparatus of Function Extension
CN109714358A (en) * 2019-01-15 2019-05-03 广东工业大学 A kind of injection molding MES cloud platform of micro services
CN109714411A (en) * 2018-12-25 2019-05-03 浪潮电子信息产业股份有限公司 The task timing of springboot micro services frame executes method, apparatus, equipment and medium
CN109729149A (en) * 2018-12-03 2019-05-07 国云科技股份有限公司 A kind of micro services framework implementation method based on note
CN109726021A (en) * 2018-11-29 2019-05-07 国云科技股份有限公司 A kind of micro services interface defines the implementation method of class self-discovery
CN109766080A (en) * 2019-01-22 2019-05-17 努比亚技术有限公司 Micro services register method, device, electronic equipment and readable storage medium storing program for executing
CN109788055A (en) * 2019-01-11 2019-05-21 武汉虹旭信息技术有限责任公司 A kind of service governing system and its method based on micro services framework
CN109819055A (en) * 2019-03-15 2019-05-28 四川长虹电器股份有限公司 Method that is a kind of while supporting Ribbon and Eureka to realize load balancing
CN109828784A (en) * 2019-02-03 2019-05-31 普信恒业科技发展(北京)有限公司 A kind of task grasping means and device
CN109889416A (en) * 2019-02-18 2019-06-14 西安交通大学 A kind of smart home system and construction method based on micro services framework
CN109918435A (en) * 2019-02-27 2019-06-21 北京奇艺世纪科技有限公司 A kind of processing method and system of business interface
CN110011846A (en) * 2019-03-29 2019-07-12 努比亚技术有限公司 Micro services construction method, device, mobile terminal and storage medium
CN110083338A (en) * 2019-05-27 2019-08-02 广东金赋科技股份有限公司 Service system based on intelligent gateway
CN110162344A (en) * 2019-04-15 2019-08-23 深圳壹账通智能科技有限公司 A kind of method, apparatus, computer equipment and readable storage medium storing program for executing that current limliting is isolated
CN110210890A (en) * 2019-04-26 2019-09-06 上海集勇信息科技有限公司 A kind of movable share system and implementation method based on Spring Cloud
CN110209438A (en) * 2019-06-04 2019-09-06 武汉神算云信息科技有限责任公司 Data source dynamic switching method, device, equipment and storage medium under SpringBoot frame
CN110324177A (en) * 2019-05-31 2019-10-11 中国人民解放军国防科技大学 Service request processing method, system and medium under micro-service architecture
CN110417779A (en) * 2019-07-30 2019-11-05 上海派拉软件股份有限公司 A kind of authentication accessing method based on service
CN110427174A (en) * 2019-08-05 2019-11-08 浪潮云信息技术有限公司 A kind of micro services construction method based on database
CN110572364A (en) * 2019-08-06 2019-12-13 苏州浪潮智能科技有限公司 Method for realizing threat alarm in virtual environment
CN110661780A (en) * 2019-08-15 2020-01-07 西安雷迪信息技术有限公司 Wireless city data sharing method and system based on SAAS application
CN110851278A (en) * 2019-11-08 2020-02-28 南京国电南自电网自动化有限公司 Distribution network automation master station mobile application service management method and system based on micro-service architecture
CN111026606A (en) * 2019-11-13 2020-04-17 苏宁云计算有限公司 Alarm method and device based on hystrix fuse monitoring and computer equipment
CN111045648A (en) * 2019-12-11 2020-04-21 盈佳云创科技(深圳)有限公司 Micro-service development tool
CN111193803A (en) * 2019-12-31 2020-05-22 四川省公安科研中心 Spring group-based micro-service construction method and spring group micro-service framework
CN111190586A (en) * 2019-12-16 2020-05-22 腾讯科技(深圳)有限公司 Software development framework building and using method, computing device and storage medium
CN111198727A (en) * 2020-01-06 2020-05-26 成都库珀区块链科技有限公司 Microservice interface data aggregation system and method
CN111831318A (en) * 2020-06-30 2020-10-27 山东大学 Micro-service management system capable of automatically generating codes and code generation method
CN112039780A (en) * 2020-09-01 2020-12-04 浪潮云信息技术股份公司 Zuul-based persistent dynamic routing implementation method, electronic device and storage medium
CN112258162A (en) * 2020-11-04 2021-01-22 广西电网有限责任公司 One-stop information application system
CN112379640A (en) * 2019-09-29 2021-02-19 北京城建设计发展集团股份有限公司 Distributed intelligent sensing controller
CN112486466A (en) * 2020-12-11 2021-03-12 光大兴陇信托有限责任公司 Method for realizing quick universal basic framework based on micro-service architecture
CN112527337A (en) * 2020-12-30 2021-03-19 成都四方伟业软件股份有限公司 Plug-in heterogeneous data source heat plugging loading engine method and device
CN112565403A (en) * 2020-12-04 2021-03-26 中信银行股份有限公司 Application node self-isolation method and device and electronic equipment
CN112788112A (en) * 2020-12-30 2021-05-11 北京航天测控技术有限公司 Automatic publishing method, device and platform for equipment health management micro-service
CN113296844A (en) * 2021-05-31 2021-08-24 北京深思云天科技有限公司 Multi-runtime framework method and system based on micro-service
CN113419713A (en) * 2021-07-20 2021-09-21 国家电网有限公司客户服务中心 API packaging arrangement method for network national network service capability
CN114615271A (en) * 2022-01-18 2022-06-10 银盛通信有限公司 Million-level concurrent lottery drawing method based on mobile resale system
US11381552B2 (en) 2019-07-22 2022-07-05 Boe Technology Group Co., Ltd. Service providing method and apparatus and electronic device
CN114924766A (en) * 2022-05-06 2022-08-19 北京结慧科技有限公司 Script construction method and device based on construction tool, computer equipment and medium
CN115134396A (en) * 2022-06-24 2022-09-30 京东方科技集团股份有限公司 Service calling method and device, electronic equipment and storage medium
CN115729526A (en) * 2022-11-29 2023-03-03 北京京航计算通讯研究所 Monomer and micro-service integrated software development method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016192866A1 (en) * 2015-06-03 2016-12-08 Telefonaktiebolaget Lm Ericsson (Publ) Implanted agent within a first service container for enabling a reverse proxy on a second container
CN106506605A (en) * 2016-10-14 2017-03-15 华南理工大学 A kind of SaaS application construction methods based on micro services framework

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016192866A1 (en) * 2015-06-03 2016-12-08 Telefonaktiebolaget Lm Ericsson (Publ) Implanted agent within a first service container for enabling a reverse proxy on a second container
CN106506605A (en) * 2016-10-14 2017-03-15 华南理工大学 A kind of SaaS application construction methods based on micro services framework

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ZEB_PERFECT: ""微服务应用-基于Spring Cloud和Reactor构建网上商店微服务(上)"", 《HTTPS://BLOG.CSDN.NET/ZEB_PERFECT/ARTICLE/DETAILS/52096766》 *
码农笔录: ""springcloud微服务实战_Eureka+Zuul+Feign_Ribbon+Hystrix Turbine+SpringConfig+sleuth+zipkin_码农笔录-微信公众号博客-CSDN博客"", 《HTTPS://BLOG.CSDN.NET/YP090416/ARTICLE/DETAILS/78017552》 *

Cited By (71)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240765A (en) * 2018-08-28 2019-01-18 中国联合网络通信集团有限公司 Blowout method, device, equipment and the computer readable storage medium of Service Source
CN109240765B (en) * 2018-08-28 2021-08-10 中国联合网络通信集团有限公司 Fusing method, device and equipment for service resources and computer readable storage medium
CN109271291A (en) * 2018-09-04 2019-01-25 山东浪潮通软信息科技有限公司 A kind of service monitoring and the method for management
CN109491792A (en) * 2018-11-13 2019-03-19 北京车和家信息技术有限公司 A kind of page backing method, device and gateway
CN109491792B (en) * 2018-11-13 2020-12-25 北京车和家信息技术有限公司 Page rollback method, device and gateway
CN109683957A (en) * 2018-11-28 2019-04-26 厦门中控智慧信息技术有限公司 The method and apparatus of Function Extension
CN109726021A (en) * 2018-11-29 2019-05-07 国云科技股份有限公司 A kind of micro services interface defines the implementation method of class self-discovery
CN109379430A (en) * 2018-11-30 2019-02-22 四川芯波智创物联技术有限公司 A kind of shared platform that is full of altogether of " Internet of Things+" industry ecosphere
CN109379430B (en) * 2018-11-30 2021-01-08 四川芯波智创物联技术有限公司 'Internet of things +' industry ecosphere sharing and sharing platform
CN109729149A (en) * 2018-12-03 2019-05-07 国云科技股份有限公司 A kind of micro services framework implementation method based on note
CN109597610A (en) * 2018-12-10 2019-04-09 南京华苏科技有限公司 A kind of application structure modularization construction method based on micro services framework
CN109670952A (en) * 2018-12-12 2019-04-23 中国对外经济贸易信托有限公司 One kind, which is withheld, pays transaction platform
CN109670952B (en) * 2018-12-12 2022-12-23 中国对外经济贸易信托有限公司 Collecting and paying transaction platform
CN109634657A (en) * 2018-12-14 2019-04-16 武汉烽火信息集成技术有限公司 A kind of micro services are packaged dispositions method and system
CN109634616A (en) * 2018-12-21 2019-04-16 北京博明信德科技有限公司 The PaaS platform fast disposed
CN109614553A (en) * 2018-12-21 2019-04-12 北京博明信德科技有限公司 PaaS platform for log collection
CN109714411A (en) * 2018-12-25 2019-05-03 浪潮电子信息产业股份有限公司 The task timing of springboot micro services frame executes method, apparatus, equipment and medium
CN109671140A (en) * 2018-12-26 2019-04-23 江苏赞奇科技股份有限公司 A kind of cloud rendering service processing method using micro services
CN109671140B (en) * 2018-12-26 2024-02-02 上海赞奇文化科技有限公司 Cloud rendering service processing method adopting micro-service
CN109684820A (en) * 2018-12-28 2019-04-26 天津卓朗科技发展有限公司 Service Privileges acquisition methods, device and electronic equipment
CN109587272B (en) * 2018-12-30 2021-10-08 深圳云天励飞技术有限公司 Method and device for optimizing microservice and electronic equipment
CN109587272A (en) * 2018-12-30 2019-04-05 深圳云天励飞技术有限公司 A kind of optimization method of micro services, device and electronic equipment
CN109788055B (en) * 2019-01-11 2021-07-30 武汉虹旭信息技术有限责任公司 Service management system and method based on micro-service architecture
CN109788055A (en) * 2019-01-11 2019-05-21 武汉虹旭信息技术有限责任公司 A kind of service governing system and its method based on micro services framework
CN109714358A (en) * 2019-01-15 2019-05-03 广东工业大学 A kind of injection molding MES cloud platform of micro services
CN109766080A (en) * 2019-01-22 2019-05-17 努比亚技术有限公司 Micro services register method, device, electronic equipment and readable storage medium storing program for executing
CN109766080B (en) * 2019-01-22 2023-11-10 西藏联萨智能科技有限公司 Micro-service registration method, micro-service registration device, electronic equipment and readable storage medium
CN109828784B (en) * 2019-02-03 2022-04-26 普信恒业科技发展(北京)有限公司 Task grabbing method and device
CN109828784A (en) * 2019-02-03 2019-05-31 普信恒业科技发展(北京)有限公司 A kind of task grasping means and device
CN109889416A (en) * 2019-02-18 2019-06-14 西安交通大学 A kind of smart home system and construction method based on micro services framework
CN109889416B (en) * 2019-02-18 2020-06-19 西安交通大学 Intelligent home system based on micro-service architecture and construction method
CN109918435A (en) * 2019-02-27 2019-06-21 北京奇艺世纪科技有限公司 A kind of processing method and system of business interface
CN109819055A (en) * 2019-03-15 2019-05-28 四川长虹电器股份有限公司 Method that is a kind of while supporting Ribbon and Eureka to realize load balancing
CN110011846A (en) * 2019-03-29 2019-07-12 努比亚技术有限公司 Micro services construction method, device, mobile terminal and storage medium
CN110162344A (en) * 2019-04-15 2019-08-23 深圳壹账通智能科技有限公司 A kind of method, apparatus, computer equipment and readable storage medium storing program for executing that current limliting is isolated
CN110210890A (en) * 2019-04-26 2019-09-06 上海集勇信息科技有限公司 A kind of movable share system and implementation method based on Spring Cloud
CN110083338B (en) * 2019-05-27 2023-12-22 广东金赋科技股份有限公司 Service system based on intelligent gateway
CN110083338A (en) * 2019-05-27 2019-08-02 广东金赋科技股份有限公司 Service system based on intelligent gateway
CN110324177A (en) * 2019-05-31 2019-10-11 中国人民解放军国防科技大学 Service request processing method, system and medium under micro-service architecture
CN110324177B (en) * 2019-05-31 2022-05-24 中国人民解放军国防科技大学 Service request processing method, system and medium under micro-service architecture
CN110209438A (en) * 2019-06-04 2019-09-06 武汉神算云信息科技有限责任公司 Data source dynamic switching method, device, equipment and storage medium under SpringBoot frame
US11381552B2 (en) 2019-07-22 2022-07-05 Boe Technology Group Co., Ltd. Service providing method and apparatus and electronic device
CN110417779A (en) * 2019-07-30 2019-11-05 上海派拉软件股份有限公司 A kind of authentication accessing method based on service
CN110427174A (en) * 2019-08-05 2019-11-08 浪潮云信息技术有限公司 A kind of micro services construction method based on database
CN110572364A (en) * 2019-08-06 2019-12-13 苏州浪潮智能科技有限公司 Method for realizing threat alarm in virtual environment
CN110661780A (en) * 2019-08-15 2020-01-07 西安雷迪信息技术有限公司 Wireless city data sharing method and system based on SAAS application
CN112379640B (en) * 2019-09-29 2021-06-22 北京城建设计发展集团股份有限公司 Distributed intelligent sensing controller
CN112379640A (en) * 2019-09-29 2021-02-19 北京城建设计发展集团股份有限公司 Distributed intelligent sensing controller
CN110851278A (en) * 2019-11-08 2020-02-28 南京国电南自电网自动化有限公司 Distribution network automation master station mobile application service management method and system based on micro-service architecture
CN111026606A (en) * 2019-11-13 2020-04-17 苏宁云计算有限公司 Alarm method and device based on hystrix fuse monitoring and computer equipment
CN111045648B (en) * 2019-12-11 2024-03-15 盈佳云创科技(深圳)有限公司 Micro-service development device
CN111045648A (en) * 2019-12-11 2020-04-21 盈佳云创科技(深圳)有限公司 Micro-service development tool
CN111190586A (en) * 2019-12-16 2020-05-22 腾讯科技(深圳)有限公司 Software development framework building and using method, computing device and storage medium
CN111193803A (en) * 2019-12-31 2020-05-22 四川省公安科研中心 Spring group-based micro-service construction method and spring group micro-service framework
CN111198727A (en) * 2020-01-06 2020-05-26 成都库珀区块链科技有限公司 Microservice interface data aggregation system and method
CN111198727B (en) * 2020-01-06 2023-12-29 库珀科技集团有限公司 Micro-service interface data aggregation system and method
CN111831318A (en) * 2020-06-30 2020-10-27 山东大学 Micro-service management system capable of automatically generating codes and code generation method
CN112039780A (en) * 2020-09-01 2020-12-04 浪潮云信息技术股份公司 Zuul-based persistent dynamic routing implementation method, electronic device and storage medium
CN112258162B (en) * 2020-11-04 2021-09-07 广西电网有限责任公司 One-stop information application system
CN112258162A (en) * 2020-11-04 2021-01-22 广西电网有限责任公司 One-stop information application system
CN112565403A (en) * 2020-12-04 2021-03-26 中信银行股份有限公司 Application node self-isolation method and device and electronic equipment
CN112565403B (en) * 2020-12-04 2022-09-06 中信银行股份有限公司 Application node self-isolation method and device and electronic equipment
CN112486466A (en) * 2020-12-11 2021-03-12 光大兴陇信托有限责任公司 Method for realizing quick universal basic framework based on micro-service architecture
CN112527337A (en) * 2020-12-30 2021-03-19 成都四方伟业软件股份有限公司 Plug-in heterogeneous data source heat plugging loading engine method and device
CN112788112A (en) * 2020-12-30 2021-05-11 北京航天测控技术有限公司 Automatic publishing method, device and platform for equipment health management micro-service
CN113296844A (en) * 2021-05-31 2021-08-24 北京深思云天科技有限公司 Multi-runtime framework method and system based on micro-service
CN113419713A (en) * 2021-07-20 2021-09-21 国家电网有限公司客户服务中心 API packaging arrangement method for network national network service capability
CN114615271A (en) * 2022-01-18 2022-06-10 银盛通信有限公司 Million-level concurrent lottery drawing method based on mobile resale system
CN114924766A (en) * 2022-05-06 2022-08-19 北京结慧科技有限公司 Script construction method and device based on construction tool, computer equipment and medium
CN115134396A (en) * 2022-06-24 2022-09-30 京东方科技集团股份有限公司 Service calling method and device, electronic equipment and storage medium
CN115729526A (en) * 2022-11-29 2023-03-03 北京京航计算通讯研究所 Monomer and micro-service integrated software development method

Similar Documents

Publication Publication Date Title
CN108446111A (en) A kind of micro services construction method based on Spring cloud
CN109814909A (en) Method based on Spring cloud micro services framework cloud SCADA system
CN110134374A (en) Method based on Spring cloud micro services framework cloud SCADA system
US10318285B1 (en) Deployment of infrastructure in pipelines
Li et al. Blockchain-based digital twin sharing platform for reconfigurable socialized manufacturing resource integration
US10620944B2 (en) Cloud-based decision management platform
Sitaram et al. Moving to the cloud: Developing apps in the new world of cloud computing
CN112486547B (en) Application program updating method and device under multi-tenant scene and electronic equipment
Tulloch Introducing Windows Azure for IT Professionals
WO2008033394A2 (en) Complexity management tool
Tekinerdogan et al. Feature-driven design of SaaS architectures
Park et al. Approach for selecting and integrating cloud services to construct hybrid cloud
Data Cloud
Rosenbaum Serverless computing in Azure with. NET
Tischer et al. Programming and Automating Cisco Networks: A guide to network programmability and automation in the data center, campus, and WAN
Vyas et al. Core Kubernetes
Odun-Ayo et al. Cloud and application programming interface–Issues and developments
Ajzele et al. Magento 2 Developer's Guide: Harness the power of Magento 2 to extend and customize your online store
Freeman Building Serverless Microservices in Python: A complete guide to building, testing, and deploying microservices using serverless computing on AWS
Genovese Data Mesh: the newest paradigm shift for a distributed architecture in the data world and its application
Hatami-Alamdari et al. Monolithic architecture vs. multi-layered cloud-based architecture in the CRM application domain
Höing Orchestrating secure workflows for cloud and grid services
Waschke Cloud-Specific Standards: A Tide to Raise All Boats
Dupupet Oracle data integrator 11g cookbook
Knoch et al. Evaluating Cloud-Native Deployment Options with a Focus on Reliability Aspects

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180824

RJ01 Rejection of invention patent application after publication