org.springframework.cloud.netflix.zuul.filters.discovery.DiscoveryClientRouteLocator Java Examples

The following examples show how to use org.springframework.cloud.netflix.zuul.filters.discovery.DiscoveryClientRouteLocator. 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: DynamicRouteConfiguration.java    From Taroco with Apache License 2.0 5 votes vote down vote up
@Bean
public DiscoveryClientRouteLocator dynamicRouteLocator() {
    return new DynamicRouteLocator(
            server.getServlet().getPath()
            , discovery
            , zuulProperties
            , registration
            , redisRepository);
}
 
Example #2
Source File: ApimlRoutingConfig.java    From api-layer with Eclipse Public License 2.0 5 votes vote down vote up
@Bean
@Autowired
public DiscoveryClientRouteLocator discoveryClientRouteLocator(DiscoveryClient discovery,
                                                               ZuulProperties zuulProperties,
                                                               ServiceRouteMapper serviceRouteMapper,
                                                               WebSocketProxyServerHandler webSocketProxyServerHandler,
                                                               PageRedirectionFilter pageRedirectionFilter) {
    List<RoutedServicesUser> routedServicesUsers = new ArrayList<>();
    routedServicesUsers.add(locationFilter());
    routedServicesUsers.add(webSocketProxyServerHandler);
    routedServicesUsers.add(pageRedirectionFilter);
    zuulProperties.setDecodeUrl(false);

    return new ApimlRouteLocator("", discovery, zuulProperties, serviceRouteMapper, routedServicesUsers);
}