org.springframework.cloud.netflix.zuul.web.ZuulHandlerMapping Java Examples

The following examples show how to use org.springframework.cloud.netflix.zuul.web.ZuulHandlerMapping. 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: PreservesHttpHeadersZuulStrategy.java    From spring-cloud-ribbon-extensions with Apache License 2.0 5 votes vote down vote up
/**
 * {@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);
}