本文整理汇总了Java中io.github.jhipster.registry.web.filter.CachingHttpHeadersFilter类的典型用法代码示例。如果您正苦于以下问题:Java CachingHttpHeadersFilter类的具体用法?Java CachingHttpHeadersFilter怎么用?Java CachingHttpHeadersFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CachingHttpHeadersFilter类属于io.github.jhipster.registry.web.filter包,在下文中一共展示了CachingHttpHeadersFilter类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initCachingHttpHeadersFilter
import io.github.jhipster.registry.web.filter.CachingHttpHeadersFilter; //导入依赖的package包/类
/**
* Initializes the caching HTTP Headers Filter.
*/
private void initCachingHttpHeadersFilter(ServletContext servletContext,
EnumSet<DispatcherType> disps) {
log.debug("Registering Caching HTTP Headers Filter");
FilterRegistration.Dynamic cachingHttpHeadersFilter =
servletContext.addFilter("cachingHttpHeadersFilter",
new CachingHttpHeadersFilter(jHipsterProperties));
cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/content/*");
cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/app/*");
cachingHttpHeadersFilter.setAsyncSupported(true);
}