接口的使用
org.springframework.core.io.Resource
使用Resource的程序包 程序包 说明 org.springframework.beans.factory.config SPI interfaces and configuration-related convenience classes for bean factories.org.springframework.beans.factory.groovy Support package for Groovy-based bean definitions.org.springframework.beans.factory.parsing Support infrastructure for bean definition parsing.org.springframework.beans.factory.support Classes supporting theorg.springframework.beans.factory
package.org.springframework.beans.factory.xml Contains an abstract XML-basedBeanFactory
implementation, including a standard "spring-beans" XSD.org.springframework.cache.ehcache Support classes for the open source cache EhCache 2.x, allowing to set up an EhCache CacheManager and Caches as beans in a Spring context.org.springframework.context.support Classes supporting the org.springframework.context package, such as abstract base classes for ApplicationContext implementations and a MessageSource implementation.org.springframework.core.codec org.springframework.core.io Generic abstraction for (file-based) resources, used throughout the framework.org.springframework.core.io.buffer Generic abstraction for working with byte buffer implementations.org.springframework.core.io.support Support classes for Spring's resource abstraction.org.springframework.core.type.classreading Support classes for reading annotation and class-level metadata.org.springframework.http Contains a basic abstraction over client/server-side HTTP.org.springframework.http.codec org.springframework.http.converter Provides an HttpMessageConverter abstraction to convert between Java objects and HTTP input/output messages.org.springframework.jdbc.config Defines the Spring JDBC configuration namespace.org.springframework.jdbc.datasource.init Provides extensible support for initializing databases through scripts.org.springframework.jdbc.support Support classes for the JDBC framework, used by the classes in the jdbc.core and jdbc.object packages.org.springframework.jmx.export.naming Provides a strategy for ObjectName creation.org.springframework.mail.javamail JavaMail support for Spring's mail infrastructure.org.springframework.orm.hibernate5 Package providing integration of Hibernate 5.x with Spring concepts.org.springframework.oxm.jaxb Package providing integration of JAXB with Spring's O/X Mapping support.org.springframework.oxm.support Provides generic support classes for using Spring's O/X Mapping integration within various scenario's.org.springframework.remoting.jaxws Remoting classes for Web Services via JAX-WS (the successor of JAX-RPC), as included in Java 6 and Java EE 5.org.springframework.scheduling.quartz Support classes for the open source scheduler Quartz, allowing to set up Quartz Schedulers, JobDetails and Triggers as beans in a Spring context.org.springframework.scripting.support Support classes for Spring's scripting package.org.springframework.test.context.util Common utilities used within the Spring TestContext Framework.org.springframework.test.web.client.response Contains built-inResponseCreator
implementations.org.springframework.ui.freemarker Support classes for setting up FreeMarker within a Spring application context.org.springframework.validation.beanvalidation Support classes for integrating a JSR-303 Bean Validation provider (such as Hibernate Validator) into a Spring ApplicationContext and in particular with Spring's data binding and validation APIs.org.springframework.web.accept This package contains classes used to determine the requested the media types in a request.org.springframework.web.context.support Classes supporting theorg.springframework.web.context
package, such as WebApplicationContext implementations and various utility classes.org.springframework.web.multipart Multipart resolution framework for handling file uploads.org.springframework.web.multipart.commons MultipartResolver implementation for Apache Commons FileUpload.org.springframework.web.reactive.function Provides a foundation for both the reactive client and server subpackages.org.springframework.web.reactive.function.server Provides the types that make up Spring's functional web framework for Reactive environments.org.springframework.web.reactive.resource Support classes for serving static resources.org.springframework.web.reactive.result.view.script Support classes for views based on the JSR-223 script engine abstraction (as included in Java 6+), e.g. using JavaScript via Nashorn on JDK 8.org.springframework.web.servlet.function Provides the types that make up Spring's functional web framework for Servlet environments.org.springframework.web.servlet.resource Support classes for serving static resources.org.springframework.web.servlet.view Provides standard View and ViewResolver implementations, including abstract base classes for custom implementations.org.springframework.web.servlet.view.script Support classes for views based on the JSR-223 script engine abstraction (as included in Java 6+), e.g. using JavaScript via Nashorn on JDK 8.org.springframework.beans.factory.config中Resource的使用
参数类型为Resource的org.springframework.beans.factory.config中的方法 修饰符和类型 方法 说明 void
YamlProcessor. setResources(Resource... resources)
Set locations of YAMLresources
to be loaded.org.springframework.beans.factory.groovy中Resource的使用
参数类型为Resource的org.springframework.beans.factory.groovy中的方法 修饰符和类型 方法 说明 int
GroovyBeanDefinitionReader. loadBeanDefinitions(Resource resource)
Load bean definitions from the specified Groovy script or XML file.org.springframework.beans.factory.parsing中Resource的使用
返回Resource的org.springframework.beans.factory.parsing中的方法 修饰符和类型 方法 说明 Resource[]
ImportDefinition. getActualResources()
Resource
Location. getResource()
Get the resource with which this location is associated.Resource
ReaderContext. getResource()
参数类型为Resource的org.springframework.beans.factory.parsing中的方法 修饰符和类型 方法 说明 Object
NullSourceExtractor. extractSource(Object sourceCandidate, Resource definitionResource)
This implementation simply returnsnull
for any input.Object
PassThroughSourceExtractor. extractSource(Object sourceCandidate, Resource definingResource)
Simply returns the suppliedsourceCandidate
as-is.Object
SourceExtractor. extractSource(Object sourceCandidate, Resource definingResource)
Extract the source metadata from the candidate object supplied by the configuration parser.void
ReaderContext. fireImportProcessed(String importedResource, Resource[] actualResources, Object source)
Fire an import-processed event.参数类型为Resource的org.springframework.beans.factory.parsing中的构造器 构造器 说明 ImportDefinition(String importedResource, Resource[] actualResources, Object source)
Create a new ImportDefinition.Location(Resource resource)
Create a new instance of theLocation
class.Location(Resource resource, Object source)
Create a new instance of theLocation
class.ReaderContext(Resource resource, ProblemReporter problemReporter, ReaderEventListener eventListener, SourceExtractor sourceExtractor)
Construct a newReaderContext
.org.springframework.beans.factory.support中Resource的使用
返回Resource的org.springframework.beans.factory.support中的方法 修饰符和类型 方法 说明 Resource
AbstractBeanDefinition. getResource()
Return the resource that this bean definition came from.参数类型为Resource的org.springframework.beans.factory.support中的方法 修饰符和类型 方法 说明 int
AbstractBeanDefinitionReader. loadBeanDefinitions(Resource... resources)
int
BeanDefinitionReader. loadBeanDefinitions(Resource resource)
Load bean definitions from the specified resource.int
BeanDefinitionReader. loadBeanDefinitions(Resource... resources)
Load bean definitions from the specified resources.int
PropertiesBeanDefinitionReader. loadBeanDefinitions(Resource resource)
Load bean definitions from the specified properties file, using all property keys (i.e. not filtering by prefix).int
PropertiesBeanDefinitionReader. loadBeanDefinitions(Resource resource, String prefix)
Load bean definitions from the specified properties file.void
AbstractBeanDefinition. setResource(Resource resource)
Set the resource that this bean definition came from (for the purpose of showing context in case of errors).类型变量类型为Resource的org.springframework.beans.factory.support中的方法参数 修饰符和类型 方法 说明 int
AbstractBeanDefinitionReader. loadBeanDefinitions(String location, Set<Resource> actualResources)
Load bean definitions from the specified resource location.org.springframework.beans.factory.xml中Resource的使用
参数类型为Resource的org.springframework.beans.factory.xml中的方法 修饰符和类型 方法 说明 XmlReaderContext
XmlBeanDefinitionReader. createReaderContext(Resource resource)
Create theXmlReaderContext
to pass over to the document reader.protected int
XmlBeanDefinitionReader. detectValidationMode(Resource resource)
Detect which kind of validation to perform on the XML file identified by the suppliedResource
.protected int
XmlBeanDefinitionReader. doLoadBeanDefinitions(InputSource inputSource, Resource resource)
Actually load bean definitions from the specified XML file.protected Document
XmlBeanDefinitionReader. doLoadDocument(InputSource inputSource, Resource resource)
Actually load the specified document using the configured DocumentLoader.protected int
XmlBeanDefinitionReader. getValidationModeForResource(Resource resource)
Determine the validation mode for the specifiedResource
.int
XmlBeanDefinitionReader. loadBeanDefinitions(Resource resource)
Load bean definitions from the specified XML file.int
XmlBeanDefinitionReader. registerBeanDefinitions(Document doc, Resource resource)
Register the bean definitions contained in the given DOM document.参数类型为Resource的org.springframework.beans.factory.xml中的构造器 构造器 说明 XmlBeanFactory(Resource resource)
已过时。Create a new XmlBeanFactory with the given resource, which must be parsable using DOM.XmlBeanFactory(Resource resource, BeanFactory parentBeanFactory)
已过时。Create a new XmlBeanFactory with the given input stream, which must be parsable using DOM.XmlReaderContext(Resource resource, ProblemReporter problemReporter, ReaderEventListener eventListener, SourceExtractor sourceExtractor, XmlBeanDefinitionReader reader, NamespaceHandlerResolver namespaceHandlerResolver)
Construct a newXmlReaderContext
.org.springframework.cache.ehcache中Resource的使用
参数类型为Resource的org.springframework.cache.ehcache中的方法 修饰符和类型 方法 说明 static CacheManager
EhCacheManagerUtils. buildCacheManager(String name, Resource configLocation)
Build an EhCacheCacheManager
from the given configuration resource.static CacheManager
EhCacheManagerUtils. buildCacheManager(Resource configLocation)
Build an EhCacheCacheManager
from the given configuration resource.static Configuration
EhCacheManagerUtils. parseConfiguration(Resource configLocation)
Parse EhCache configuration from the given resource, for further use with customCacheManager
creation.void
EhCacheManagerFactoryBean. setConfigLocation(Resource configLocation)
Set the location of the EhCache config file.org.springframework.context.support中Resource的使用
返回Resource的org.springframework.context.support中的方法 修饰符和类型 方法 说明 protected Resource[]
AbstractXmlApplicationContext. getConfigResources()
Return an array of Resource objects, referring to the XML bean definition files that this context should be built with.protected Resource[]
ClassPathXmlApplicationContext. getConfigResources()
Resource
GenericApplicationContext. getResource(String location)
This implementation delegates to this context's ResourceLoader if set, falling back to the default superclass behavior else.protected Resource
FileSystemXmlApplicationContext. getResourceByPath(String path)
Resolve resource paths as file system paths.Resource[]
AbstractApplicationContext. getResources(String locationPattern)
Resource[]
GenericApplicationContext. getResources(String locationPattern)
This implementation delegates to this context's ResourceLoader if it implements the ResourcePatternResolver interface, falling back to the default superclass behavior else.参数类型为Resource的org.springframework.context.support中的方法 修饰符和类型 方法 说明 void
GenericGroovyApplicationContext. load(Resource... resources)
Load bean definitions from the given Groovy scripts or XML files.void
GenericXmlApplicationContext. load(Resource... resources)
Load bean definitions from the given XML resources.protected Properties
ReloadableResourceBundleMessageSource. loadProperties(Resource resource, String filename)
Load the properties from the given resource.参数类型为Resource的org.springframework.context.support中的构造器 构造器 说明 GenericGroovyApplicationContext(Resource... resources)
Create a new GenericGroovyApplicationContext, loading bean definitions from the given resources and automatically refreshing the context.GenericXmlApplicationContext(Resource... resources)
Create a new GenericXmlApplicationContext, loading bean definitions from the given resources and automatically refreshing the context.org.springframework.core.codec中Resource的使用
返回Resource的org.springframework.core.codec中的方法 修饰符和类型 方法 说明 Resource
ResourceDecoder. decode(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
返回变量类型为Resource的类型的org.springframework.core.codec中的方法 修饰符和类型 方法 说明 reactor.core.publisher.Flux<Resource>
ResourceDecoder. decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
参数类型为Resource的org.springframework.core.codec中的方法 修饰符和类型 方法 说明 protected reactor.core.publisher.Flux<DataBuffer>
ResourceEncoder. encode(Resource resource, DataBufferFactory bufferFactory, ResolvableType type, MimeType mimeType, Map<String,Object> hints)
org.springframework.core.io中Resource的使用
org.springframework.core.io中Resource的子接口 修饰符和类型 接口 说明 interface
ContextResource
Extended interface for a resource that is loaded from an enclosing 'context', e.g. from aServletContext
but also from plain classpath paths or relative file system paths (specified without an explicit prefix, hence applying relative to the localResourceLoader
's context).interface
WritableResource
Extended interface for a resource that supports writing to it.实现Resource的org.springframework.core.io中的类 修饰符和类型 类 说明 class
AbstractFileResolvingResource
Abstract base class for resources which resolve URLs into File references, such asUrlResource
orClassPathResource
.class
AbstractResource
Convenience base class forResource
implementations, pre-implementing typical behavior.class
ByteArrayResource
Resource
implementation for a given byte array.class
ClassPathResource
Resource
implementation for class path resources.protected static class
DefaultResourceLoader.ClassPathContextResource
ClassPathResource that explicitly expresses a context-relative path through implementing the ContextResource interface.class
DescriptiveResource
SimpleResource
implementation that holds a resource description but does not point to an actually readable resource.class
FileSystemResource
class
FileUrlResource
Subclass ofUrlResource
which assumes file resolution, to the degree of implementing theWritableResource
interface for it.class
InputStreamResource
Resource
implementation for a givenInputStream
.class
PathResource
class
UrlResource
Resource
implementation forjava.net.URL
locators.class
VfsResource
JBoss VFS basedResource
implementation.返回Resource的org.springframework.core.io中的方法 修饰符和类型 方法 说明 Resource
AbstractResource. createRelative(String relativePath)
This implementation throws a FileNotFoundException, assuming that relative resources cannot be created for this resource.Resource
ClassPathResource. createRelative(String relativePath)
This implementation creates a ClassPathResource, applying the given path relative to the path of the underlying resource of this descriptor.Resource
DefaultResourceLoader.ClassPathContextResource. createRelative(String relativePath)
Resource
FileSystemResource. createRelative(String relativePath)
This implementation creates a FileSystemResource, applying the given path relative to the path of the underlying file of this resource descriptor.Resource
FileUrlResource. createRelative(String relativePath)
Resource
PathResource. createRelative(String relativePath)
This implementation creates a PathResource, applying the given path relative to the path of the underlying file of this resource descriptor.Resource
Resource. createRelative(String relativePath)
Create a resource relative to this resource.Resource
UrlResource. createRelative(String relativePath)
This implementation creates aUrlResource
, delegating toUrlResource.createRelativeURL(String)
for adapting the relative path.Resource
VfsResource. createRelative(String relativePath)
Resource
DefaultResourceLoader. getResource(String location)
Resource
ResourceLoader. getResource(String location)
Return a Resource handle for the specified resource location.protected Resource
ClassRelativeResourceLoader. getResourceByPath(String path)
protected Resource
DefaultResourceLoader. getResourceByPath(String path)
Return a Resource handle for the resource at the given path.protected Resource
FileSystemResourceLoader. getResourceByPath(String path)
Resolve resource paths as file system paths.Resource
ProtocolResolver. resolve(String location, ResourceLoader resourceLoader)
Resolve the given location against the given resource loader if this implementation's protocol matches.返回变量类型为Resource的类型的org.springframework.core.io中的方法 修饰符和类型 方法 说明 <T> Map<Resource,T>
DefaultResourceLoader. getResourceCache(Class<T> valueType)
Obtain a cache for the given value type, keyed byResource
.org.springframework.core.io.buffer中Resource的使用
参数类型为Resource的org.springframework.core.io.buffer中的方法 修饰符和类型 方法 说明 static reactor.core.publisher.Flux<DataBuffer>
DataBufferUtils. read(Resource resource, long position, DataBufferFactory bufferFactory, int bufferSize)
Read the givenResource
into aFlux
ofDataBuffer
s starting at the given position.static reactor.core.publisher.Flux<DataBuffer>
DataBufferUtils. read(Resource resource, DataBufferFactory bufferFactory, int bufferSize)
Read the givenResource
into aFlux
ofDataBuffer
s.org.springframework.core.io.support中Resource的使用
返回Resource的org.springframework.core.io.support中的方法 修饰符和类型 方法 说明 protected Resource
PathMatchingResourcePatternResolver. convertClassLoaderURL(URL url)
Convert the given URL as returned from the ClassLoader into aResource
.protected Resource[]
PathMatchingResourcePatternResolver. findAllClassPathResources(String location)
Find all class location resources with the given location via the ClassLoader.Resource
LocalizedResourceHelper. findLocalizedResource(String name, String extension, Locale locale)
Find the most specific localized resource for the given name, extension and locale:protected Resource[]
PathMatchingResourcePatternResolver. findPathMatchingResources(String locationPattern)
Find all resources that match the given location pattern via the Ant-style PathMatcher.Resource
EncodedResource. getResource()
Return theResource
held by thisEncodedResource
.Resource
PathMatchingResourcePatternResolver. getResource(String location)
Resource
ResourceRegion. getResource()
Return the underlyingResource
for thisResourceRegion
.Resource[]
PathMatchingResourcePatternResolver. getResources(String locationPattern)
Resource[]
ResourcePatternResolver. getResources(String locationPattern)
Resolve the given location pattern into Resource objects.protected Resource
PathMatchingResourcePatternResolver. resolveRootDirResource(Resource original)
Resolve the specified resource for path matching.返回变量类型为Resource的类型的org.springframework.core.io.support中的方法 修饰符和类型 方法 说明 protected Set<Resource>
PathMatchingResourcePatternResolver. doFindAllClassPathResources(String path)
Find all class location resources with the given path via the ClassLoader.protected Set<Resource>
PathMatchingResourcePatternResolver. doFindMatchingFileSystemResources(File rootDir, String subPattern)
Find all resources in the file system that match the given location pattern via the Ant-style PathMatcher.protected Set<Resource>
PathMatchingResourcePatternResolver. doFindPathMatchingFileResources(Resource rootDirResource, String subPattern)
Find all resources in the file system that match the given location pattern via the Ant-style PathMatcher.protected Set<Resource>
PathMatchingResourcePatternResolver. doFindPathMatchingJarResources(Resource rootDirResource, URL rootDirURL, String subPattern)
Find all resources in jar files that match the given location pattern via the Ant-style PathMatcher.参数类型为Resource的org.springframework.core.io.support中的方法 修饰符和类型 方法 说明 protected Set<Resource>
PathMatchingResourcePatternResolver. doFindPathMatchingFileResources(Resource rootDirResource, String subPattern)
Find all resources in the file system that match the given location pattern via the Ant-style PathMatcher.protected Set<Resource>
PathMatchingResourcePatternResolver. doFindPathMatchingJarResources(Resource rootDirResource, URL rootDirURL, String subPattern)
Find all resources in jar files that match the given location pattern via the Ant-style PathMatcher.static void
PropertiesLoaderUtils. fillProperties(Properties props, Resource resource)
Fill the given properties from the given resource (in ISO-8859-1 encoding).protected boolean
PathMatchingResourcePatternResolver. isJarResource(Resource resource)
Return whether the given resource handle indicates a jar resource that thedoFindPathMatchingJarResources
method can handle.static Properties
PropertiesLoaderUtils. loadProperties(Resource resource)
Load properties from the given resource (in ISO-8859-1 encoding).protected Resource
PathMatchingResourcePatternResolver. resolveRootDirResource(Resource original)
Resolve the specified resource for path matching.void
PropertiesLoaderSupport. setLocation(Resource location)
Set a location of a properties file to be loaded.void
PropertiesLoaderSupport. setLocations(Resource... locations)
Set locations of properties files to be loaded.类型变量类型为Resource的org.springframework.core.io.support中的方法参数 修饰符和类型 方法 说明 protected void
PathMatchingResourcePatternResolver. addAllClassLoaderJarRoots(ClassLoader classLoader, Set<Resource> result)
Search allURLClassLoader
URLs for jar file references and add them to the given set of resources in the form of pointers to the root of the jar file content.protected void
PathMatchingResourcePatternResolver. addClassPathManifestEntries(Set<Resource> result)
Determine jar file references from the "java.class.path." manifest property and add them to the given set of resources in the form of pointers to the root of the jar file content.参数类型为Resource的org.springframework.core.io.support中的构造器 构造器 说明 EncodedResource(Resource resource)
Create a newEncodedResource
for the givenResource
, not specifying an explicit encoding orCharset
.EncodedResource(Resource resource, String encoding)
Create a newEncodedResource
for the givenResource
, using the specifiedencoding
.EncodedResource(Resource resource, Charset charset)
Create a newEncodedResource
for the givenResource
, using the specifiedCharset
.ResourcePropertySource(String name, Resource resource)
Create a PropertySource having the given name based on Properties loaded from the given encoded resource.ResourcePropertySource(Resource resource)
Create a PropertySource based on Properties loaded from the given resource.ResourceRegion(Resource resource, long position, long count)
Create a newResourceRegion
from a givenResource
.org.springframework.core.type.classreading中Resource的使用
返回Resource的org.springframework.core.type.classreading中的方法 修饰符和类型 方法 说明 Resource
MetadataReader. getResource()
Return the resource reference for the class file.参数类型为Resource的org.springframework.core.type.classreading中的方法 修饰符和类型 方法 说明 MetadataReader
CachingMetadataReaderFactory. getMetadataReader(Resource resource)
MetadataReader
MetadataReaderFactory. getMetadataReader(Resource resource)
Obtain a MetadataReader for the given resource.MetadataReader
SimpleMetadataReaderFactory. getMetadataReader(Resource resource)
org.springframework.http中Resource的使用
参数类型为Resource的org.springframework.http中的方法 修饰符和类型 方法 说明 static Optional<MediaType>
MediaTypeFactory. getMediaType(Resource resource)
Determine a media type for the given resource, if possible.ResourceRegion
HttpRange. toResourceRegion(Resource resource)
Turn aResource
into aResourceRegion
using the range information contained in the currentHttpRange
.static List<ResourceRegion>
HttpRange. toResourceRegions(List<HttpRange> ranges, Resource resource)
Convert eachHttpRange
into aResourceRegion
, selecting the appropriate segment of the givenResource
using HTTP Range information.org.springframework.http.codec中Resource的使用
类型变量类型为Resource的org.springframework.http.codec中的方法参数 修饰符和类型 方法 说明 reactor.core.publisher.Mono<Void>
ResourceHttpMessageWriter. write(org.reactivestreams.Publisher<? extends Resource> inputStream, ResolvableType actualType, ResolvableType elementType, MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response, Map<String,Object> hints)
reactor.core.publisher.Mono<Void>
ResourceHttpMessageWriter. write(org.reactivestreams.Publisher<? extends Resource> inputStream, ResolvableType elementType, MediaType mediaType, ReactiveHttpOutputMessage message, Map<String,Object> hints)
org.springframework.http.converter中Resource的使用
返回Resource的org.springframework.http.converter中的方法 修饰符和类型 方法 说明 protected Resource
ResourceHttpMessageConverter. readInternal(Class<? extends Resource> clazz, HttpInputMessage inputMessage)
参数类型为Resource的org.springframework.http.converter中的方法 修饰符和类型 方法 说明 protected Long
ResourceHttpMessageConverter. getContentLength(Resource resource, MediaType contentType)
protected MediaType
ResourceHttpMessageConverter. getDefaultContentType(Resource resource)
protected void
ResourceHttpMessageConverter. writeContent(Resource resource, HttpOutputMessage outputMessage)
protected void
ResourceHttpMessageConverter. writeInternal(Resource resource, HttpOutputMessage outputMessage)
类型变量类型为Resource的org.springframework.http.converter中的方法参数 修饰符和类型 方法 说明 protected Resource
ResourceHttpMessageConverter. readInternal(Class<? extends Resource> clazz, HttpInputMessage inputMessage)
org.springframework.jdbc.config中Resource的使用
返回Resource的org.springframework.jdbc.config中的方法 修饰符和类型 方法 说明 protected Resource[]
SortedResourcesFactoryBean. createInstance()
org.springframework.jdbc.datasource.init中Resource的使用
参数类型为Resource的org.springframework.jdbc.datasource.init中的方法 修饰符和类型 方法 说明 void
ResourceDatabasePopulator. addScript(Resource script)
Add a script to execute to initialize or clean up the database.void
ResourceDatabasePopulator. addScripts(Resource... scripts)
Add multiple scripts to execute to initialize or clean up the database.static void
ScriptUtils. executeSqlScript(Connection connection, Resource resource)
Execute the given SQL script using default settings for statement separators, comment delimiters, and exception handling flags.void
ResourceDatabasePopulator. setScripts(Resource... scripts)
Set the scripts to execute to initialize or clean up the database, replacing any previously added scripts.参数类型为Resource的org.springframework.jdbc.datasource.init中的构造器 构造器 说明 ResourceDatabasePopulator(boolean continueOnError, boolean ignoreFailedDrops, String sqlScriptEncoding, Resource... scripts)
Construct a newResourceDatabasePopulator
with the supplied values.ResourceDatabasePopulator(Resource... scripts)
Construct a newResourceDatabasePopulator
with default settings for the supplied scripts.org.springframework.jdbc.support中Resource的使用
返回Resource的org.springframework.jdbc.support中的方法 修饰符和类型 方法 说明 protected Resource
SQLErrorCodesFactory. loadResource(String path)
Load the given resource from the class path.org.springframework.jmx.export.naming中Resource的使用
参数类型为Resource的org.springframework.jmx.export.naming中的方法 修饰符和类型 方法 说明 void
KeyNamingStrategy. setMappingLocation(Resource location)
Set a location of a properties file to be loaded, containing object name mappings.void
KeyNamingStrategy. setMappingLocations(Resource... mappingLocations)
Set location of properties files to be loaded, containing object name mappings.org.springframework.mail.javamail中Resource的使用
参数类型为Resource的org.springframework.mail.javamail中的方法 修饰符和类型 方法 说明 void
MimeMessageHelper. addInline(String contentId, Resource resource)
Add an inline element to the MimeMessage, taking the content from aorg.springframework.core.io.Resource
.protected FileTypeMap
ConfigurableMimeFileTypeMap. createFileTypeMap(Resource mappingLocation, String[] mappings)
Compile aFileTypeMap
from the mappings in the given mapping file and the given mapping entries.void
ConfigurableMimeFileTypeMap. setMappingLocation(Resource mappingLocation)
Specify theResource
from which mappings are loaded.org.springframework.orm.hibernate5中Resource的使用
参数类型为Resource的org.springframework.orm.hibernate5中的方法 修饰符和类型 方法 说明 void
LocalSessionFactoryBean. setCacheableMappingLocations(Resource... cacheableMappingLocations)
Set locations of cacheable Hibernate mapping files, for example as web app resource "/WEB-INF/mapping/example.hbm.xml".void
LocalSessionFactoryBean. setConfigLocation(Resource configLocation)
Set the location of a single Hibernate XML config file, for example as classpath resource "classpath:hibernate.cfg.xml".void
LocalSessionFactoryBean. setConfigLocations(Resource... configLocations)
Set the locations of multiple Hibernate XML config files, for example as classpath resources "classpath:hibernate.cfg.xml,classpath:extension.cfg.xml".void
LocalSessionFactoryBean. setMappingDirectoryLocations(Resource... mappingDirectoryLocations)
Set locations of directories that contain Hibernate mapping resources, like "WEB-INF/mappings".void
LocalSessionFactoryBean. setMappingJarLocations(Resource... mappingJarLocations)
Set locations of jar files that contain Hibernate mapping resources, like "WEB-INF/lib/example.hbm.jar".void
LocalSessionFactoryBean. setMappingLocations(Resource... mappingLocations)
Set locations of Hibernate mapping files, for example as classpath resource "classpath:example.hbm.xml".org.springframework.oxm.jaxb中Resource的使用
参数类型为Resource的org.springframework.oxm.jaxb中的方法 修饰符和类型 方法 说明 void
Jaxb2Marshaller. setSchema(Resource schemaResource)
Set the schema resource to use for validation.void
Jaxb2Marshaller. setSchemas(Resource... schemaResources)
Set the schema resources to use for validation.org.springframework.oxm.support中Resource的使用
参数类型为Resource的org.springframework.oxm.support中的方法 修饰符和类型 方法 说明 static InputSource
SaxResourceUtils. createInputSource(Resource resource)
Create a SAXInputSource
from the given resource.org.springframework.remoting.jaxws中Resource的使用
参数类型为Resource的org.springframework.remoting.jaxws中的方法 修饰符和类型 方法 说明 void
LocalJaxWsServiceFactory. setWsdlDocumentResource(Resource wsdlDocumentResource)
Set the WSDL document URL as aResource
.org.springframework.scheduling.quartz中Resource的使用
参数类型为Resource的org.springframework.scheduling.quartz中的方法 修饰符和类型 方法 说明 void
SchedulerFactoryBean. setConfigLocation(Resource configLocation)
Set the location of the Quartz properties config file, for example as classpath resource "classpath:quartz.properties".org.springframework.scripting.support中Resource的使用
返回Resource的org.springframework.scripting.support中的方法 修饰符和类型 方法 说明 Resource
ResourceScriptSource. getResource()
Return theResource
to load the script from.参数类型为Resource的org.springframework.scripting.support中的构造器 构造器 说明 ResourceScriptSource(Resource resource)
Create a new ResourceScriptSource for the given resource.org.springframework.test.context.util中Resource的使用
返回Resource的org.springframework.test.context.util中的方法 修饰符和类型 方法 说明 static Resource[]
TestContextResourceUtils. convertToResources(ResourceLoader resourceLoader, String... paths)
Convert the supplied paths to an array ofResource
handles using the givenResourceLoader
.返回变量类型为Resource的类型的org.springframework.test.context.util中的方法 修饰符和类型 方法 说明 static List<Resource>
TestContextResourceUtils. convertToResourceList(ResourceLoader resourceLoader, String... paths)
Convert the supplied paths to a list ofResource
handles using the givenResourceLoader
.org.springframework.test.web.client.response中Resource的使用
参数类型为Resource的org.springframework.test.web.client.response中的方法 修饰符和类型 方法 说明 DefaultResponseCreator
DefaultResponseCreator. body(Resource resource)
Set the body as aResource
.static DefaultResponseCreator
MockRestResponseCreators. withSuccess(Resource body, MediaType contentType)
ResponseCreator
for a 200 response (OK) content withResource
-based body.org.springframework.ui.freemarker中Resource的使用
参数类型为Resource的org.springframework.ui.freemarker中的方法 修饰符和类型 方法 说明 void
FreeMarkerConfigurationFactory. setConfigLocation(Resource resource)
Set the location of the FreeMarker config file.org.springframework.validation.beanvalidation中Resource的使用
参数类型为Resource的org.springframework.validation.beanvalidation中的方法 修饰符和类型 方法 说明 void
LocalValidatorFactoryBean. setMappingLocations(Resource... mappingLocations)
Specify resource locations to load XML constraint mapping files from, if any.org.springframework.web.accept中Resource的使用
参数类型为Resource的org.springframework.web.accept中的方法 修饰符和类型 方法 说明 MediaType
PathExtensionContentNegotiationStrategy. getMediaTypeForResource(Resource resource)
已过时。MediaType
ServletPathExtensionContentNegotiationStrategy. getMediaTypeForResource(Resource resource)
已过时。Extends the base classPathExtensionContentNegotiationStrategy.getMediaTypeForResource(org.springframework.core.io.Resource)
with the ability to also look up through the ServletContext.org.springframework.web.context.support中Resource的使用
实现Resource的org.springframework.web.context.support中的类 修饰符和类型 类 说明 class
ServletContextResource
Resource
implementation forServletContext
resources, interpreting relative paths within the web application root directory.返回Resource的org.springframework.web.context.support中的方法 修饰符和类型 方法 说明 Resource
ServletContextResource. createRelative(String relativePath)
This implementation creates a ServletContextResource, applying the given path relative to the path of the underlying file of this resource descriptor.protected Resource
AbstractRefreshableWebApplicationContext. getResourceByPath(String path)
This implementation supports file paths beneath the root of the ServletContext.protected Resource
GenericWebApplicationContext. getResourceByPath(String path)
This implementation supports file paths beneath the root of the ServletContext.protected Resource
ServletContextResourceLoader. getResourceByPath(String path)
This implementation supports file paths beneath the root of the web application.protected Resource
StaticWebApplicationContext. getResourceByPath(String path)
This implementation supports file paths beneath the root of the ServletContext.返回变量类型为Resource的类型的org.springframework.web.context.support中的方法 修饰符和类型 方法 说明 protected Set<Resource>
ServletContextResourcePatternResolver. doFindPathMatchingFileResources(Resource rootDirResource, String subPattern)
Overridden version which checks for ServletContextResource and usesServletContext.getResourcePaths
to find matching resources below the web application root directory.参数类型为Resource的org.springframework.web.context.support中的方法 修饰符和类型 方法 说明 protected Set<Resource>
ServletContextResourcePatternResolver. doFindPathMatchingFileResources(Resource rootDirResource, String subPattern)
Overridden version which checks for ServletContextResource and usesServletContext.getResourcePaths
to find matching resources below the web application root directory.类型变量类型为Resource的org.springframework.web.context.support中的方法参数 修饰符和类型 方法 说明 protected void
ServletContextResourcePatternResolver. doRetrieveMatchingServletContextResources(ServletContext servletContext, String fullPattern, String dir, Set<Resource> result)
Recursively retrieve ServletContextResources that match the given pattern, adding them to the given result set.org.springframework.web.multipart中Resource的使用
返回Resource的org.springframework.web.multipart中的方法 修饰符和类型 方法 说明 default Resource
MultipartFile. getResource()
Return a Resource representation of this MultipartFile.org.springframework.web.multipart.commons中Resource的使用
参数类型为Resource的org.springframework.web.multipart.commons中的方法 修饰符和类型 方法 说明 void
CommonsFileUploadSupport. setUploadTempDir(Resource uploadTempDir)
Set the temporary directory where uploaded files get stored.org.springframework.web.reactive.function中Resource的使用
类型参数类型为Resource的org.springframework.web.reactive.function中的方法 修饰符和类型 方法 说明 static <T extends Resource>
BodyInserter<T,ReactiveHttpOutputMessage>BodyInserters. fromResource(T resource)
Inserter to write the givenResource
.org.springframework.web.reactive.function.server中Resource的使用
返回变量类型为Resource的类型的org.springframework.web.reactive.function.server中的方法 修饰符和类型 方法 说明 static Function<ServerRequest,reactor.core.publisher.Mono<Resource>>
RouterFunctions. resourceLookupFunction(String pattern, Resource location)
Returns the resource lookup function used byRouterFunctions.resources(String, Resource)
.参数类型为Resource的org.springframework.web.reactive.function.server中的方法 修饰符和类型 方法 说明 static Function<ServerRequest,reactor.core.publisher.Mono<Resource>>
RouterFunctions. resourceLookupFunction(String pattern, Resource location)
Returns the resource lookup function used byRouterFunctions.resources(String, Resource)
.RouterFunctions.Builder
RouterFunctions.Builder. resources(String pattern, Resource location)
Route requests that match the given pattern to resources relative to the given root location.static RouterFunction<ServerResponse>
RouterFunctions. resources(String pattern, Resource location)
Route requests that match the given pattern to resources relative to the given root location.类型变量类型为Resource的org.springframework.web.reactive.function.server中的方法参数 修饰符和类型 方法 说明 RouterFunctions.Builder
RouterFunctions.Builder. resources(Function<ServerRequest,reactor.core.publisher.Mono<Resource>> lookupFunction)
Route to resources using the provided lookup function.static RouterFunction<ServerResponse>
RouterFunctions. resources(Function<ServerRequest,reactor.core.publisher.Mono<Resource>> lookupFunction)
Route to resources using the provided lookup function.void
RouterFunctions.Visitor. resources(Function<ServerRequest,reactor.core.publisher.Mono<Resource>> lookupFunction)
Receive notification of a resource router function.org.springframework.web.reactive.resource中Resource的使用
org.springframework.web.reactive.resource中Resource的子接口 修饰符和类型 接口 说明 interface
HttpResource
Extended interface for aResource
to be written to an HTTP response.实现Resource的org.springframework.web.reactive.resource中的类 修饰符和类型 类 说明 class
TransformedResource
An extension ofByteArrayResource
that aResourceTransformer
can use to represent an original resource preserving all other information except the content.返回Resource的org.springframework.web.reactive.resource中的方法 修饰符和类型 方法 说明 Resource[]
PathResourceResolver. getAllowedLocations()
返回变量类型为Resource的类型的org.springframework.web.reactive.resource中的方法 修饰符和类型 方法 说明 List<Resource>
ResourceWebHandler. getLocations()
Return theList
ofResource
paths to use as sources for serving static resources.protected reactor.core.publisher.Mono<Resource>
PathResourceResolver. getResource(String resourcePath, Resource location)
Find the resource under the given location.protected reactor.core.publisher.Mono<Resource>
ResourceWebHandler. getResource(ServerWebExchange exchange)
reactor.core.publisher.Mono<Resource>
AbstractResourceResolver. resolveResource(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
reactor.core.publisher.Mono<Resource>
ResourceResolver. resolveResource(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
Resolve the supplied request and request path to aResource
that exists under one of the given resource locations.reactor.core.publisher.Mono<Resource>
ResourceResolverChain. resolveResource(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations)
Resolve the supplied request and request path to aResource
that exists under one of the given resource locations.protected abstract reactor.core.publisher.Mono<Resource>
AbstractResourceResolver. resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<Resource>
CachingResourceResolver. resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<Resource>
EncodedResourceResolver. resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<Resource>
GzipResourceResolver. resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
已过时。protected reactor.core.publisher.Mono<Resource>
PathResourceResolver. resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<Resource>
VersionResourceResolver. resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<Resource>
WebJarsResourceResolver. resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
reactor.core.publisher.Mono<Resource>
AppCacheManifestTransformer. transform(ServerWebExchange exchange, Resource inputResource, ResourceTransformerChain chain)
reactor.core.publisher.Mono<Resource>
CachingResourceTransformer. transform(ServerWebExchange exchange, Resource resource, ResourceTransformerChain transformerChain)
reactor.core.publisher.Mono<Resource>
CssLinkResourceTransformer. transform(ServerWebExchange exchange, Resource inputResource, ResourceTransformerChain transformerChain)
reactor.core.publisher.Mono<Resource>
ResourceTransformer. transform(ServerWebExchange exchange, Resource resource, ResourceTransformerChain transformerChain)
Transform the given resource.reactor.core.publisher.Mono<Resource>
ResourceTransformerChain. transform(ServerWebExchange exchange, Resource resource)
Transform the given resource.参数类型为Resource的org.springframework.web.reactive.resource中的方法 修饰符和类型 方法 说明 protected boolean
PathResourceResolver. checkResource(Resource resource, Resource location)
Perform additional checks on a resolved resource beyond checking whether the resources exists and is readable.protected reactor.core.publisher.Mono<Resource>
PathResourceResolver. getResource(String resourcePath, Resource location)
Find the resource under the given location.reactor.core.publisher.Mono<String>
ContentVersionStrategy. getResourceVersion(Resource resource)
reactor.core.publisher.Mono<String>
FixedVersionStrategy. getResourceVersion(Resource resource)
reactor.core.publisher.Mono<String>
VersionStrategy. getResourceVersion(Resource resource)
Determine the version for the given resource.protected reactor.core.publisher.Mono<String>
ResourceTransformerSupport. resolveUrlPath(String resourcePath, ServerWebExchange exchange, Resource resource, ResourceTransformerChain transformerChain)
A transformer can use this method when a resource being transformed contains links to other resources.void
PathResourceResolver. setAllowedLocations(Resource... locations)
By default when a Resource is found, the path of the resolved resource is compared to ensure it's under the input location where it was found.protected void
ResourceWebHandler. setHeaders(ServerWebExchange exchange, Resource resource, MediaType mediaType)
Set headers on the response.reactor.core.publisher.Mono<Resource>
AppCacheManifestTransformer. transform(ServerWebExchange exchange, Resource inputResource, ResourceTransformerChain chain)
reactor.core.publisher.Mono<Resource>
CachingResourceTransformer. transform(ServerWebExchange exchange, Resource resource, ResourceTransformerChain transformerChain)
reactor.core.publisher.Mono<Resource>
CssLinkResourceTransformer. transform(ServerWebExchange exchange, Resource inputResource, ResourceTransformerChain transformerChain)
reactor.core.publisher.Mono<Resource>
ResourceTransformer. transform(ServerWebExchange exchange, Resource resource, ResourceTransformerChain transformerChain)
Transform the given resource.reactor.core.publisher.Mono<Resource>
ResourceTransformerChain. transform(ServerWebExchange exchange, Resource resource)
Transform the given resource.类型变量类型为Resource的org.springframework.web.reactive.resource中的方法参数 修饰符和类型 方法 说明 reactor.core.publisher.Mono<Resource>
AbstractResourceResolver. resolveResource(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
reactor.core.publisher.Mono<Resource>
ResourceResolver. resolveResource(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
Resolve the supplied request and request path to aResource
that exists under one of the given resource locations.reactor.core.publisher.Mono<Resource>
ResourceResolverChain. resolveResource(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations)
Resolve the supplied request and request path to aResource
that exists under one of the given resource locations.protected abstract reactor.core.publisher.Mono<Resource>
AbstractResourceResolver. resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<Resource>
CachingResourceResolver. resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<Resource>
EncodedResourceResolver. resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<Resource>
GzipResourceResolver. resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
已过时。protected reactor.core.publisher.Mono<Resource>
PathResourceResolver. resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<Resource>
VersionResourceResolver. resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<Resource>
WebJarsResourceResolver. resolveResourceInternal(ServerWebExchange exchange, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
reactor.core.publisher.Mono<String>
AbstractResourceResolver. resolveUrlPath(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
reactor.core.publisher.Mono<String>
ResourceResolver. resolveUrlPath(String resourcePath, List<? extends Resource> locations, ResourceResolverChain chain)
Resolve the externally facing public URL path for clients to use to access the resource that is located at the given internal resource path.reactor.core.publisher.Mono<String>
ResourceResolverChain. resolveUrlPath(String resourcePath, List<? extends Resource> locations)
Resolve the externally facing public URL path for clients to use to access the resource that is located at the given internal resource path.protected abstract reactor.core.publisher.Mono<String>
AbstractResourceResolver. resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<String>
CachingResourceResolver. resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<String>
EncodedResourceResolver. resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<String>
GzipResourceResolver. resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
已过时。protected reactor.core.publisher.Mono<String>
PathResourceResolver. resolveUrlPathInternal(String path, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<String>
VersionResourceResolver. resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected reactor.core.publisher.Mono<String>
WebJarsResourceResolver. resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
void
ResourceWebHandler. setLocations(List<Resource> locations)
Set theList
ofResource
paths to use as sources for serving static resources.参数类型为Resource的org.springframework.web.reactive.resource中的构造器 构造器 说明 TransformedResource(Resource original, byte[] transformedContent)
org.springframework.web.reactive.result.view.script中Resource的使用
返回Resource的org.springframework.web.reactive.result.view.script中的方法 修饰符和类型 方法 说明 protected Resource
ScriptTemplateView. getResource(String location)
org.springframework.web.servlet.function中Resource的使用
返回变量类型为Resource的类型的org.springframework.web.servlet.function中的方法 修饰符和类型 方法 说明 static Function<ServerRequest,Optional<Resource>>
RouterFunctions. resourceLookupFunction(String pattern, Resource location)
Returns the resource lookup function used byRouterFunctions.resources(String, Resource)
.参数类型为Resource的org.springframework.web.servlet.function中的方法 修饰符和类型 方法 说明 static Function<ServerRequest,Optional<Resource>>
RouterFunctions. resourceLookupFunction(String pattern, Resource location)
Returns the resource lookup function used byRouterFunctions.resources(String, Resource)
.RouterFunctions.Builder
RouterFunctions.Builder. resources(String pattern, Resource location)
Route requests that match the given pattern to resources relative to the given root location.static RouterFunction<ServerResponse>
RouterFunctions. resources(String pattern, Resource location)
Route requests that match the given pattern to resources relative to the given root location.类型变量类型为Resource的org.springframework.web.servlet.function中的方法参数 修饰符和类型 方法 说明 RouterFunctions.Builder
RouterFunctions.Builder. resources(Function<ServerRequest,Optional<Resource>> lookupFunction)
Route to resources using the provided lookup function.static RouterFunction<ServerResponse>
RouterFunctions. resources(Function<ServerRequest,Optional<Resource>> lookupFunction)
Route to resources using the provided lookup function.void
RouterFunctions.Visitor. resources(Function<ServerRequest,Optional<Resource>> lookupFunction)
Receive notification of a resource router function.org.springframework.web.servlet.resource中Resource的使用
org.springframework.web.servlet.resource中Resource的子接口 修饰符和类型 接口 说明 interface
HttpResource
Extended interface for aResource
to be written to an HTTP response.实现Resource的org.springframework.web.servlet.resource中的类 修饰符和类型 类 说明 class
TransformedResource
An extension ofByteArrayResource
that aResourceTransformer
can use to represent an original resource preserving all other information except the content.返回Resource的org.springframework.web.servlet.resource中的方法 修饰符和类型 方法 说明 Resource[]
PathResourceResolver. getAllowedLocations()
protected Resource
PathResourceResolver. getResource(String resourcePath, Resource location)
Find the resource under the given location.protected Resource
ResourceHttpRequestHandler. getResource(HttpServletRequest request)
Resource
AbstractResourceResolver. resolveResource(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
Resource
ResourceResolver. resolveResource(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
Resolve the supplied request and request path to aResource
that exists under one of the given resource locations.Resource
ResourceResolverChain. resolveResource(HttpServletRequest request, String requestPath, List<? extends Resource> locations)
Resolve the supplied request and request path to aResource
that exists under one of the given resource locations.protected abstract Resource
AbstractResourceResolver. resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected Resource
CachingResourceResolver. resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected Resource
EncodedResourceResolver. resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected Resource
GzipResourceResolver. resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
已过时。protected Resource
PathResourceResolver. resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected Resource
VersionResourceResolver. resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected Resource
WebJarsResourceResolver. resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
Resource
AppCacheManifestTransformer. transform(HttpServletRequest request, Resource resource, ResourceTransformerChain chain)
Resource
CachingResourceTransformer. transform(HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain)
Resource
CssLinkResourceTransformer. transform(HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain)
Resource
ResourceTransformer. transform(HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain)
Transform the given resource.Resource
ResourceTransformerChain. transform(HttpServletRequest request, Resource resource)
Transform the given resource.返回变量类型为Resource的类型的org.springframework.web.servlet.resource中的方法 修饰符和类型 方法 说明 Map<Resource,Charset>
PathResourceResolver. getLocationCharsets()
Return charsets associated with static resource locations.List<Resource>
ResourceHttpRequestHandler. getLocations()
Return the configuredList
ofResource
locations.参数类型为Resource的org.springframework.web.servlet.resource中的方法 修饰符和类型 方法 说明 protected boolean
PathResourceResolver. checkResource(Resource resource, Resource location)
Perform additional checks on a resolved resource beyond checking whether the resources exists and is readable.protected MediaType
ResourceHttpRequestHandler. getMediaType(HttpServletRequest request, Resource resource)
Determine the media type for the given request and the resource matched to it.protected Resource
PathResourceResolver. getResource(String resourcePath, Resource location)
Find the resource under the given location.String
ContentVersionStrategy. getResourceVersion(Resource resource)
String
FixedVersionStrategy. getResourceVersion(Resource resource)
String
VersionStrategy. getResourceVersion(Resource resource)
Determine the version for the given resource.protected String
ResourceTransformerSupport. resolveUrlPath(String resourcePath, HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain)
A transformer can use this method when a resource being transformed contains links to other resources.void
PathResourceResolver. setAllowedLocations(Resource... locations)
By default when a Resource is found, the path of the resolved resource is compared to ensure it's under the input location where it was found.protected void
ResourceHttpRequestHandler. setHeaders(HttpServletResponse response, Resource resource, MediaType mediaType)
Set headers on the given servlet response.Resource
AppCacheManifestTransformer. transform(HttpServletRequest request, Resource resource, ResourceTransformerChain chain)
Resource
CachingResourceTransformer. transform(HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain)
Resource
CssLinkResourceTransformer. transform(HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain)
Resource
ResourceTransformer. transform(HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain)
Transform the given resource.Resource
ResourceTransformerChain. transform(HttpServletRequest request, Resource resource)
Transform the given resource.类型变量类型为Resource的org.springframework.web.servlet.resource中的方法参数 修饰符和类型 方法 说明 Resource
AbstractResourceResolver. resolveResource(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
Resource
ResourceResolver. resolveResource(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
Resolve the supplied request and request path to aResource
that exists under one of the given resource locations.Resource
ResourceResolverChain. resolveResource(HttpServletRequest request, String requestPath, List<? extends Resource> locations)
Resolve the supplied request and request path to aResource
that exists under one of the given resource locations.protected abstract Resource
AbstractResourceResolver. resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected Resource
CachingResourceResolver. resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected Resource
EncodedResourceResolver. resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected Resource
GzipResourceResolver. resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
已过时。protected Resource
PathResourceResolver. resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected Resource
VersionResourceResolver. resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected Resource
WebJarsResourceResolver. resolveResourceInternal(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain)
String
AbstractResourceResolver. resolveUrlPath(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
String
ResourceResolver. resolveUrlPath(String resourcePath, List<? extends Resource> locations, ResourceResolverChain chain)
Resolve the externally facing public URL path for clients to use to access the resource that is located at the given internal resource path.String
ResourceResolverChain. resolveUrlPath(String resourcePath, List<? extends Resource> locations)
Resolve the externally facing public URL path for clients to use to access the resource that is located at the given internal resource path.protected abstract String
AbstractResourceResolver. resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected String
CachingResourceResolver. resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected String
EncodedResourceResolver. resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected String
GzipResourceResolver. resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
已过时。protected String
PathResourceResolver. resolveUrlPathInternal(String resourcePath, List<? extends Resource> locations, ResourceResolverChain chain)
protected String
VersionResourceResolver. resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
protected String
WebJarsResourceResolver. resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain)
void
PathResourceResolver. setLocationCharsets(Map<Resource,Charset> locationCharsets)
Configure charsets associated with locations.void
ResourceHttpRequestHandler. setLocations(List<Resource> locations)
Set theList
ofResource
locations to use as sources for serving static resources.参数类型为Resource的org.springframework.web.servlet.resource中的构造器 构造器 说明 TransformedResource(Resource original, byte[] transformedContent)
org.springframework.web.servlet.view中Resource的使用
参数类型为Resource的org.springframework.web.servlet.view中的方法 修饰符和类型 方法 说明 void
XmlViewResolver. setLocation(Resource location)
Set the location of the XML file that defines the view beans.org.springframework.web.servlet.view.script中Resource的使用
返回Resource的org.springframework.web.servlet.view.script中的方法 修饰符和类型 方法 说明 protected Resource
ScriptTemplateView. getResource(String location)