org.springframework.web.servlet.mvc.WebContentInterceptor Java Examples
The following examples show how to use
org.springframework.web.servlet.mvc.WebContentInterceptor.
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: WebConfig.java From Spring with Apache License 2.0 | 5 votes |
@Bean WebContentInterceptor webChangeInterceptor() { WebContentInterceptor webContentInterceptor = new WebContentInterceptor(); webContentInterceptor.setCacheSeconds(0); webContentInterceptor.setSupportedMethods("GET", "POST", "PUT", "DELETE"); return webContentInterceptor; }
Example #2
Source File: WebConfig.java From Spring with Apache License 2.0 | 5 votes |
@Bean WebContentInterceptor webChangeInterceptor() { WebContentInterceptor webContentInterceptor = new WebContentInterceptor(); webContentInterceptor.setCacheSeconds(0); webContentInterceptor.setSupportedMethods("GET", "POST", "PUT", "DELETE"); return webContentInterceptor; }
Example #3
Source File: WebConfig.java From Spring with Apache License 2.0 | 5 votes |
@Bean WebContentInterceptor webChangeInterceptor() { WebContentInterceptor webContentInterceptor = new WebContentInterceptor(); webContentInterceptor.setCacheSeconds(0); webContentInterceptor.setSupportedMethods("GET", "POST", "PUT", "DELETE"); return webContentInterceptor; }
Example #4
Source File: WebConfig.java From Spring with Apache License 2.0 | 5 votes |
@Bean WebContentInterceptor webChangeInterceptor() { final WebContentInterceptor webContentInterceptor = new WebContentInterceptor(); webContentInterceptor.setCacheSeconds(0); webContentInterceptor.setSupportedMethods("GET", "POST", "PUT", "DELETE"); return webContentInterceptor; }
Example #5
Source File: WebMvcConfiguration.java From bonita-ui-designer with GNU General Public License v2.0 | 5 votes |
/** * In Internet Explorer http requests are cached by default. It's a problem when we want to provide a REST API. This interceptor * adds headers in the responses to desactivate the cache. NB : static resources are cached but managed by the resource handlers * * @param registry */ @Override public void addInterceptors(InterceptorRegistry registry) { WebContentInterceptor interceptor = new WebContentInterceptor(); interceptor.setCacheSeconds(0); interceptor.setUseExpiresHeader(true); interceptor.setUseCacheControlHeader(true); interceptor.setUseCacheControlNoStore(true); registry.addInterceptor(interceptor); }
Example #6
Source File: WebConfig.java From onboard with Apache License 2.0 | 5 votes |
@Bean WebContentInterceptor initWebContentInterceptor() { WebContentInterceptor webContentInterceptor = new WebContentInterceptor(); webContentInterceptor.setCacheSeconds(0); webContentInterceptor.setUseCacheControlHeader(true); return webContentInterceptor; }
Example #7
Source File: WebAdminConfiguration.java From wallride with Apache License 2.0 | 5 votes |
@Override public void addInterceptors(InterceptorRegistry registry) { WebContentInterceptor webContentInterceptor = new WebContentInterceptor(); webContentInterceptor.setCacheSeconds(0); webContentInterceptor.setUseExpiresHeader(true); webContentInterceptor.setUseCacheControlHeader(true); webContentInterceptor.setUseCacheControlNoStore(true); registry.addInterceptor(webContentInterceptor); registry.addInterceptor(defaultModelAttributeInterceptor); registry.addInterceptor(setupRedirectInterceptor); }
Example #8
Source File: CacheWebConfig.java From tutorials with MIT License | 5 votes |
@Override public void addInterceptors(InterceptorRegistry registry) { WebContentInterceptor interceptor = new WebContentInterceptor(); interceptor.addCacheMapping(CacheControl.maxAge(60, TimeUnit.SECONDS) .noTransform() .mustRevalidate(), "/login/*"); registry.addInterceptor(interceptor); }