当前位置: 首页>>代码示例>>Java>>正文


Java ServiceRouteMapper类代码示例

本文整理汇总了Java中org.springframework.cloud.netflix.zuul.filters.discovery.ServiceRouteMapper的典型用法代码示例。如果您正苦于以下问题:Java ServiceRouteMapper类的具体用法?Java ServiceRouteMapper怎么用?Java ServiceRouteMapper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ServiceRouteMapper类属于org.springframework.cloud.netflix.zuul.filters.discovery包,在下文中一共展示了ServiceRouteMapper类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testFixLink

import org.springframework.cloud.netflix.zuul.filters.discovery.ServiceRouteMapper; //导入依赖的package包/类
@Test
public void testFixLink() throws Exception {
    ServiceRouteMapper mapper = new ModuleServiceMapper();
    DiscoveryClient discoveryClient = mock(DiscoveryClient.class);
    ResponseLinksMapper responseLinksMapper = new ResponseLinksMapper(mapper, discoveryClient);
    when(discoveryClient.getServices()).thenReturn(Collections.singletonList("service-module"));
    responseLinksMapper.fillServices();
    assertEquals("http://localhost:8080/api/service/entity", responseLinksMapper.fixLink("http://service-module/entity"));
}
 
开发者ID:thomasletsch,项目名称:moserp,代码行数:10,代码来源:ResponseLinksMapperTest.java

示例2: serviceRouteMapper

import org.springframework.cloud.netflix.zuul.filters.discovery.ServiceRouteMapper; //导入依赖的package包/类
@Bean
public ServiceRouteMapper serviceRouteMapper() {
    return new ModuleServiceMapper();
}
 
开发者ID:thomasletsch,项目名称:moserp,代码行数:5,代码来源:ZuulConfiguration.java

示例3: ResponseLinksMapper

import org.springframework.cloud.netflix.zuul.filters.discovery.ServiceRouteMapper; //导入依赖的package包/类
@Autowired
public ResponseLinksMapper(ServiceRouteMapper serviceRouteMapper, DiscoveryClient discoveryClient) {
    this.serviceRouteMapper = serviceRouteMapper;
    this.discoveryClient = discoveryClient;
}
 
开发者ID:thomasletsch,项目名称:moserp,代码行数:6,代码来源:ResponseLinksMapper.java

示例4: serviceRouteMapper

import org.springframework.cloud.netflix.zuul.filters.discovery.ServiceRouteMapper; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean(ServiceRouteMapper.class)
public ServiceRouteMapper serviceRouteMapper() {
	return new SimpleServiceRouteMapper();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-netflix,代码行数:6,代码来源:ZuulProxyAutoConfiguration.java


注:本文中的org.springframework.cloud.netflix.zuul.filters.discovery.ServiceRouteMapper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。