美文网首页
#spring-gateway-filters

#spring-gateway-filters

作者: 伊夫_艾尔斯 | 来源:发表于2020-09-01 16:08 被阅读0次

    1. WebFilter

    全名: org.springframework.web.server.WebFilter

    filter方法介绍: 处理Web请求并(可选地)通过给定的WebFilterChain委托给下一个WebFilter。

    工作岗位: WebFilter作为Web请求的第一道关口,负责处理所有客户端(特别提示: 如果当前项目有对应访问的接口,则不会再进入路由判定,匹配到的接口直接处理请求);

    2. GatewayFilter

    全名: org.springframework.cloud.gateway.filter.GatewayFilter

    filter方法介绍: (特定于网关)处理Web请求并(可选地)通过给定的WebFilterChain委托给下一个WebFilter。

    工作岗位: GatewayFilter作为gateway路由过滤器,负责处理所有匹配到网关路由的客户端请求(需要通过了gateway的路由判定才会进入该过滤器);

    3. GlobalFilter

    全名: org.springframework.cloud.gateway.filter.GlobalFilter

    filter方法介绍: 处理Web请求并(可选地)通过给定的WebFilterChain委托给下一个WebFilter。

    工作岗位: GlobalFilter作为gateway路由全局过滤器,负责把好路由最后一道关,做最后的统一处理;

    工作介入流程

    gateway-filters-20200901160600.png

    相关文章

      网友评论

          本文标题:#spring-gateway-filters

          本文链接:https://www.haomeiwen.com/subject/aqmvsktx.html