SpringCloud study notes (seven, SpringCloud Netflix Zuul)

table of Contents:

  • springcloud integration eureka, config, zuul
  • zuul source code analysis

springcloud integration eureka, config, zuul:

1, Chart

2、GitHub:https://github.com/mrjdrs/springcloud-integration.git

zuul source code analysis:

1, zuul request lifecycle

 

 

zuul divided into 4 large filter, pre- pre-filter, route- routes filter, post- after filter, error- error filter.

) Pre: process the request before forwarding the request, such as a log, and the like check request

) Route: forwards the request to a specific service provider

) Post: some processing result received after returning to the service provider to do, such as data processing, content transformation, etc. (data desensitization)

) Error: error filter enabled exception occurs when a request

2, zuul filter

3, an example of a custom filter

See https://github.com/mrjdrs/springcloud-integration.git of com.jdr.maven.sc.integration.zuul.filter.LogFilter

 

Guess you like

Origin www.cnblogs.com/bzfsdr/p/11692778.html