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

The following examples show how to use org.springframework.cloud.gateway.discovery.DiscoveryLocatorProperties. 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: CorsConfig.java    From microservice-recruit with 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 File: GatewayApplication.java    From MyShopPlus with 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 File: CorsConfig.java    From open-capacity-platform with 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 File: CorsConfig.java    From microservice-recruit with 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 File: CorsConfiguration.java    From zuihou-admin-cloud with 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
Source File: GatewayTestApplication.java    From spring-cloud-gateway with Apache License 2.0 4 votes vote down vote up
@Bean
public DiscoveryClientRouteDefinitionLocator discoveryClientRouteLocator(
		ReactiveDiscoveryClient discoveryClient,
		DiscoveryLocatorProperties properties) {
	return new DiscoveryClientRouteDefinitionLocator(discoveryClient, properties);
}
 
Example #7
Source File: CorsConfig.java    From simple-microservice with 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 File: CorsConfig.java    From black-shop with 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);
}