• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ZuulHandlerMapping类的典型用法和代码示例

java 2次浏览

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

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

示例1: postProcessBeforeInitialization

点赞 2

import org.springframework.cloud.netflix.zuul.web.ZuulHandlerMapping; //导入依赖的package包/类
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
    if (bean instanceof ZuulHandlerMapping) {
        ZuulDynamicMapping mapping = new ZuulDynamicMapping(routeLocator, zuulController);
        mapping.setErrorController(errorController);
        return mapping;
    }
    return bean;
}
 

开发者ID:alexqdjay,
项目名称:zuul-dynamic,
代码行数:10,
代码来源:ZuulDynamicConfig.java

示例2: postProcessAfterInstantiation

点赞 2

import org.springframework.cloud.netflix.zuul.web.ZuulHandlerMapping; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public boolean postProcessAfterInstantiation(Object bean, String beanName) {
    if (bean instanceof ZuulHandlerMapping) {
        ZuulHandlerMapping zuulHandlerMapping = (ZuulHandlerMapping) bean;
        zuulHandlerMapping.setInterceptors(new PreservesHttpHeadersInterceptor(properties.buildEntriesFilter()));
        zuulHandlerMapping.setInterceptors(new ZuulHeadersEnricher(properties.buildEntriesFilter(), properties.buildExtraStaticEntries(eurekaInstanceProperties)));
        log.info("Context propagation enabled for zuul handler[{}] on keys={}.", beanName, properties.getKeys());
    }
    return super.postProcessAfterInstantiation(bean, beanName);
}
 

开发者ID:enadim,
项目名称:spring-cloud-ribbon-extensions,
代码行数:14,
代码来源:PreservesHttpHeadersZuulStrategy.java

示例3: postProcessBeforeInitialization

点赞 2

import org.springframework.cloud.netflix.zuul.web.ZuulHandlerMapping; //导入依赖的package包/类
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName)
		throws BeansException {
	if (bean instanceof ZuulHandlerMapping) {
		if (log.isDebugEnabled()) {
			log.debug("Attaching trace interceptor to bean [" + beanName + "] of type [" + bean.getClass().getSimpleName() + "]");
		}
		ZuulHandlerMapping zuulHandlerMapping = (ZuulHandlerMapping) bean;
		zuulHandlerMapping.setInterceptors(
				new TraceHandlerInterceptor(this.beanFactory));
	}
	return bean;
}
 

开发者ID:spring-cloud,
项目名称:spring-cloud-sleuth,
代码行数:14,
代码来源:TraceZuulHandlerMappingBeanPostProcessor.java

示例4: zuulHandlerMapping

点赞 2

import org.springframework.cloud.netflix.zuul.web.ZuulHandlerMapping; //导入依赖的package包/类
@Bean
public ZuulHandlerMapping zuulHandlerMapping(RouteLocator routes) {
	ZuulHandlerMapping mapping = new ZuulHandlerMapping(routes, zuulController());
	mapping.setErrorController(this.errorController);
	return mapping;
}
 

开发者ID:spring-cloud,
项目名称:spring-cloud-netflix,
代码行数:7,
代码来源:ZuulServerAutoConfiguration.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)