Java Code Examples for org.springframework.cloud.gateway.discovery.DiscoveryLocatorProperties

The following examples show how to use org.springframework.cloud.gateway.discovery.DiscoveryLocatorProperties. These examples are extracted from open source projects. 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 Project: microservice-recruit   Source File: CorsConfig.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * 使用了注册中心,进行控制则需要增加如下配置
 */
@Bean
public RouteDefinitionLocator discoveryClientRouteDefinitionLocator(DiscoveryClient discoveryClient,
                                                                    DiscoveryLocatorProperties properties) {
    return new DiscoveryClientRouteDefinitionLocator(discoveryClient, properties);
}
 
Example 2
Source Project: MyShopPlus   Source File: GatewayApplication.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public RouteDefinitionLocator discoveryClientRouteDefinitionLocator(DiscoveryClient discoveryClient, DiscoveryLocatorProperties properties) {
    return new DiscoveryClientRouteDefinitionLocator(discoveryClient, properties);
}
 
Example 3
Source Project: open-capacity-platform   Source File: CorsConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public RouteDefinitionLocator discoveryClientRouteDefinitionLocator(DiscoveryClient discoveryClient,
		DiscoveryLocatorProperties properties) {
	return new DiscoveryClientRouteDefinitionLocator(discoveryClient, properties);
}
 
Example 4
Source Project: microservice-recruit   Source File: CorsConfig.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * 使用了注册中心,进行控制则需要增加如下配置
 */
@Bean
public RouteDefinitionLocator discoveryClientRouteDefinitionLocator(DiscoveryClient discoveryClient,
                                                                    DiscoveryLocatorProperties properties) {
    return new DiscoveryClientRouteDefinitionLocator(discoveryClient, properties);
}
 
Example 5
Source Project: zuihou-admin-cloud   Source File: CorsConfiguration.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public RouteDefinitionLocator discoveryClientRouteDefinitionLocator(DiscoveryClient discoveryClient,
                                                                    DiscoveryLocatorProperties properties) {
    return new DiscoveryClientRouteDefinitionLocator(discoveryClient, properties);
}
 
Example 6
@Bean
public DiscoveryClientRouteDefinitionLocator discoveryClientRouteLocator(
		ReactiveDiscoveryClient discoveryClient,
		DiscoveryLocatorProperties properties) {
	return new DiscoveryClientRouteDefinitionLocator(discoveryClient, properties);
}
 
Example 7
Source Project: simple-microservice   Source File: CorsConfig.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 如果使用了注册中心(如: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 8
Source Project: black-shop   Source File: CorsConfig.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 如果使用了注册中心(如: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);
}