先看 spring.factories 自动配置文件
1、网关核型配置类:GatewayAutoConfiguration
2、服务注册配置类:GatewayDiscoveryClientAutoConfiguration
3、同步服务路由配置类:GatewayLoadBalancerClientAutoConfiguration
4、异步服务路由注册类:GatewayReactiveLoadBalancerClientAutoConfiguration
请求执行入口:
DispatcherHandler#handle->
AbstractHandlerMapping#getHandler->
(RoutePredicateHandlerMapping#getHandlerInternal->
RoutePredicateHandlerMapping#lookupRoute->
RouteDefinitionRouteLocator#getRoutes->
RouteDefinitionRouteLocator#convertToRoute->)
DispatcherHandler#invokeHandler->
FilteringWebHandler#handle->
DefaultGatewayFilterChain(combined).filter(exchange) //执行所有filter
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)