类的使用
cn.taketoday.web.config.ResourceHandlerRegistration
-
cn.taketoday.web.config中ResourceHandlerRegistration的使用
修饰符和类型方法说明ResourceHandlerRegistry.addResourceHandler(String... pathPatterns) Add a resource handler to serve static resources.ResourceHandlerRegistration.addResourceLocations(cn.taketoday.core.io.Resource... locations) Configure locations to serve static resources from based on pre-resolvedResourcereferences.ResourceHandlerRegistration.addResourceLocations(String... locations) Add one or more resource locations from which to serve static content.ResourceHandlerRegistration.notFoundHandler(HttpRequestHandler notFoundHandler) Set not found handlerResourceHandlerRegistration.setCacheControl(CacheControl cacheControl) Specify theCacheControlwhich should be used by the resource handler.ResourceHandlerRegistration.setCachePeriod(Integer cachePeriod) Specify the cache period for the resources served by the resource handler, in seconds.ResourceHandlerRegistration.setOptimizeLocations(boolean optimizeLocations) Set whether to optimize the specified locations through an existence check on startup, filtering non-existing directories upfront so that they do not have to be checked on every resource access.ResourceHandlerRegistration.setUseLastModified(boolean useLastModified) Set whether theResource.lastModified()information should be used to drive HTTP responses.修饰符和类型方法说明private ResourceHttpRequestHandlerResourceHandlerRegistry.getRequestHandler(ResourceHandlerRegistration registration)