Java 类org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry 实例源码

项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:kafka-webview    文件:WebConfig.java   
@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/");
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:smarti    文件:StaticWebResourceConfiguration.java   
@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);
    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:Spring-Security-Third-Edition    文件:WebMvcConfig.java   
@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);

    }
}
项目:EventSoft    文件:MvcConfig.java   
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
    registry
            .addResourceHandler("/resources/**")
            .addResourceLocations("/resources/")
            .setCachePeriod(3600)
            .resourceChain(true)
            .addResolver(new PathResourceResolver());
}
项目:Spring-5.0-Cookbook    文件:SpringMvcConfig.java   
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
    registry
        .addResourceHandler("/css/**")
        .addResourceLocations("/js/")
        .setCachePeriod(31556926);
}
项目:Spring-5.0-Cookbook    文件:SpringDispatcherConfig.java   
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
    registry
        .addResourceHandler("/css/**")
        .addResourceLocations("/js/**")
        .setCachePeriod(31556926);
}
项目:Spring-5.0-Cookbook    文件:SpringMvcConfig.java   
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
    registry
        .addResourceHandler("/css/**")
        .addResourceLocations("/js/")
        .setCachePeriod(31556926);
}
项目:Spring-5.0-Cookbook    文件:SpringDispatcherConfig.java   
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
    registry
        .addResourceHandler("/css/**")
        .addResourceLocations("/js/**")
        .setCachePeriod(31556926);
}
项目:amv-access-api-poc    文件:SwaggerConfiguration.java   
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
    int cachePeriodInSeconds = (int) TimeUnit.DAYS.toSeconds(1);

    if (!registry.hasMappingForPattern("/webjars/**")) {
        registry.addResourceHandler("/webjars/**")
                .addResourceLocations("classpath:/META-INF/resources/webjars/")
                .setCachePeriod(cachePeriodInSeconds);
    }
}