use of com.giffing.bucket4j.spring.boot.starter.zuul.ZuulRateLimitFilter in project bucket4j-spring-boot-starter by MarcGiffing.
the class Bucket4JAutoConfigurationZuul method createZuulFilter.
private ZuulFilter createZuulFilter(int position) {
Integer filterCount = 0;
if (properties.getFilters().size() >= (position + 1)) {
Bucket4JConfiguration filter = properties.getFilters().get(position);
filterCount++;
FilterConfiguration filterConfig = buildFilterConfig(filter, cacheManager, zuulExpressionParser(), beanFactory);
zuulConfigurationHolder().addFilterConfiguration(filter);
log.info("create-zuul-filter;{};{};{}", position, filter.getCacheName(), filter.getUrl());
return new ZuulRateLimitFilter(filterConfig);
}
return null;
}
Aggregations