@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
java类org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry的实例源码
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 35
收藏 0
点赞 0
评论 0
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 26
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 30
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 21
收藏 0
点赞 0
评论 0
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
.setCachePeriod(0)//Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 29
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/").resourceChain(true);
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/").resourceChain(true);
}
registry.addResourceHandler("/**")
.addResourceLocations(CLASSPATH_RESOURCE_LOCATIONS);
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**")
.addResourceLocations(CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 24
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 32
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
.setCachePeriod(0)//Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 35
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 31
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
.setCachePeriod(0)//Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebConfig.java 文件源码
项目:kafka-webview
阅读 39
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
// css resource
registry
.addResourceHandler("/css/**")
.addResourceLocations("classpath:/static/css/");
// js resource
registry
.addResourceHandler("/js/**")
.addResourceLocations("classpath:/static/js/");
// js resource
registry
.addResourceHandler("/vendors/**")
.addResourceLocations("classpath:/static/vendors/");
// img resource
registry
.addResourceHandler("/img/**")
.addResourceLocations("classpath:/static/img/");
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 35
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 38
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 23
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 30
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 27
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 26
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 25
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 29
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
.setCachePeriod(0)//Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 32
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 28
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 30
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 29
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 28
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
StaticWebResourceConfiguration.java 文件源码
项目:smarti
阅读 33
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/index.html")
.addResourceLocations("classpath:/public/", "classpath:/static/")
.setCacheControl(createCacheConfig(maxIndexCacheAge))
.resourceChain(true)
.addResolver(new PathResourceResolver());
final ResourceChainRegistration registration = registry.addResourceHandler("/**")
.addResourceLocations("classpath:/public/", "classpath:/static/",
"classpath:/META-INF/resources/")
.setCacheControl(createCacheConfig(maxCacheAge))
.resourceChain(true)
.addResolver(new PathResourceResolver());
if (propertyInjectionTransformer != null) {
registration.addTransformer(propertyInjectionTransformer);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 30
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 30
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 28
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 27
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 28
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}
WebMvcConfig.java 文件源码
项目:Spring-Security-Third-Edition
阅读 25
收藏 0
点赞 0
评论 0
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/")
.setCachePeriod(0) //Set to 0 in order to send cache headers that prevent caching
;
// Add WebJars for Bootstrap & jQuery
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/").resourceChain(true);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(
CLASSPATH_RESOURCE_LOCATIONS);
}
}