org.springframework.cloud.gateway.route.RouteDefinitionLocator Java Examples
The following examples show how to use
org.springframework.cloud.gateway.route.RouteDefinitionLocator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GatewayAutoConfiguration.java From spring-cloud-gateway with Apache License 2.0 | 5 votes |
@Bean @Conditional(OnVerboseDisabledCondition.class) @ConditionalOnAvailableEndpoint public GatewayLegacyControllerEndpoint gatewayLegacyControllerEndpoint( RouteDefinitionLocator routeDefinitionLocator, List<GlobalFilter> globalFilters, List<GatewayFilterFactory> gatewayFilters, List<RoutePredicateFactory> routePredicates, RouteDefinitionWriter routeDefinitionWriter, RouteLocator routeLocator) { return new GatewayLegacyControllerEndpoint(routeDefinitionLocator, globalFilters, gatewayFilters, routePredicates, routeDefinitionWriter, routeLocator); }
Example #2
Source File: GatewayAutoConfiguration.java From spring-cloud-gateway with Apache License 2.0 | 5 votes |
@Bean public RouteLocator routeDefinitionRouteLocator(GatewayProperties properties, List<GatewayFilterFactory> gatewayFilters, List<RoutePredicateFactory> predicates, RouteDefinitionLocator routeDefinitionLocator, ConfigurationService configurationService) { return new RouteDefinitionRouteLocator(routeDefinitionLocator, predicates, gatewayFilters, properties, configurationService); }
Example #3
Source File: GatewayAutoConfiguration.java From spring-cloud-gateway with Apache License 2.0 | 5 votes |
@Bean @Primary public RouteDefinitionLocator routeDefinitionLocator( List<RouteDefinitionLocator> routeDefinitionLocators) { return new CompositeRouteDefinitionLocator( Flux.fromIterable(routeDefinitionLocators)); }
Example #4
Source File: GatewayLegacyControllerEndpoint.java From spring-cloud-gateway with Apache License 2.0 | 5 votes |
public GatewayLegacyControllerEndpoint(RouteDefinitionLocator routeDefinitionLocator, List<GlobalFilter> globalFilters, List<GatewayFilterFactory> GatewayFilters, List<RoutePredicateFactory> routePredicates, RouteDefinitionWriter routeDefinitionWriter, RouteLocator routeLocator) { super(routeDefinitionLocator, globalFilters, GatewayFilters, routePredicates, routeDefinitionWriter, routeLocator); }
Example #5
Source File: AbstractGatewayControllerEndpoint.java From spring-cloud-gateway with Apache License 2.0 | 5 votes |
public AbstractGatewayControllerEndpoint( RouteDefinitionLocator routeDefinitionLocator, List<GlobalFilter> globalFilters, List<GatewayFilterFactory> gatewayFilters, List<RoutePredicateFactory> routePredicates, RouteDefinitionWriter routeDefinitionWriter, RouteLocator routeLocator) { this.routeDefinitionLocator = routeDefinitionLocator; this.globalFilters = globalFilters; this.GatewayFilters = gatewayFilters; this.routePredicates = routePredicates; this.routeDefinitionWriter = routeDefinitionWriter; this.routeLocator = routeLocator; }
Example #6
Source File: ApiConfiguration.java From open-cloud with MIT License | 4 votes |
@Bean @Primary public SwaggerProvider swaggerProvider(RouteDefinitionLocator routeDefinitionLocator) { return new SwaggerProvider(routeDefinitionLocator); }
Example #7
Source File: CorsConfiguration.java From zuihou-admin-cloud with Apache License 2.0 | 4 votes |
@Bean public RouteDefinitionLocator discoveryClientRouteDefinitionLocator(DiscoveryClient discoveryClient, DiscoveryLocatorProperties properties) { return new DiscoveryClientRouteDefinitionLocator(discoveryClient, properties); }
Example #8
Source File: CorsConfig.java From microservice-recruit with Apache License 2.0 | 4 votes |
/** * 使用了注册中心,进行控制则需要增加如下配置 */ @Bean public RouteDefinitionLocator discoveryClientRouteDefinitionLocator(DiscoveryClient discoveryClient, DiscoveryLocatorProperties properties) { return new DiscoveryClientRouteDefinitionLocator(discoveryClient, properties); }
Example #9
Source File: CorsConfig.java From microservice-recruit with Apache License 2.0 | 4 votes |
/** * 使用了注册中心,进行控制则需要增加如下配置 */ @Bean public RouteDefinitionLocator discoveryClientRouteDefinitionLocator(DiscoveryClient discoveryClient, DiscoveryLocatorProperties properties) { return new DiscoveryClientRouteDefinitionLocator(discoveryClient, properties); }
Example #10
Source File: SwaggerProvider.java From open-cloud with MIT License | 4 votes |
public SwaggerProvider(RouteDefinitionLocator routeDefinitionLocator) { this.routeDefinitionLocator = routeDefinitionLocator; }
Example #11
Source File: ResourceLocator.java From open-cloud with MIT License | 4 votes |
public void setRouteDefinitionLocator(RouteDefinitionLocator routeDefinitionLocator) { this.routeDefinitionLocator = routeDefinitionLocator; }
Example #12
Source File: ResourceLocator.java From open-cloud with MIT License | 4 votes |
public RouteDefinitionLocator getRouteDefinitionLocator() { return routeDefinitionLocator; }
Example #13
Source File: ResourceLocator.java From open-cloud with MIT License | 4 votes |
public ResourceLocator(RouteDefinitionLocator routeDefinitionLocator, BaseAuthorityServiceClient baseAuthorityServiceClient, GatewayServiceClient gatewayServiceClient) { this(); this.baseAuthorityServiceClient = baseAuthorityServiceClient; this.gatewayServiceClient = gatewayServiceClient; this.routeDefinitionLocator = routeDefinitionLocator; }
Example #14
Source File: CorsConfig.java From open-capacity-platform with Apache License 2.0 | 4 votes |
@Bean public RouteDefinitionLocator discoveryClientRouteDefinitionLocator(DiscoveryClient discoveryClient, DiscoveryLocatorProperties properties) { return new DiscoveryClientRouteDefinitionLocator(discoveryClient, properties); }
Example #15
Source File: GatewayApplication.java From MyShopPlus with Apache License 2.0 | 4 votes |
@Bean public RouteDefinitionLocator discoveryClientRouteDefinitionLocator(DiscoveryClient discoveryClient, DiscoveryLocatorProperties properties) { return new DiscoveryClientRouteDefinitionLocator(discoveryClient, properties); }
Example #16
Source File: CorsConfig.java From black-shop with Apache License 2.0 | 2 votes |
/** * 如果使用了注册中心(如:Eureka),进行控制则需要增加如下配置. * * @param discoveryClient the discovery client * @param properties the properties * @return the route definition locator */ @Bean public RouteDefinitionLocator discoveryClientRouteDefinitionLocator( DiscoveryClient discoveryClient,DiscoveryLocatorProperties properties) { return new DiscoveryClientRouteDefinitionLocator(discoveryClient, properties); }
Example #17
Source File: CorsConfig.java From simple-microservice with Apache License 2.0 | 2 votes |
/** * 如果使用了注册中心(如:Eureka),进行控制则需要增加如下配置. * * @param discoveryClient the discovery client * @param properties the properties * @return the route definition locator */ @Bean public RouteDefinitionLocator discoveryClientRouteDefinitionLocator(DiscoveryClient discoveryClient, DiscoveryLocatorProperties properties) { return new DiscoveryClientRouteDefinitionLocator(discoveryClient, properties); }