Uses of Interface
org.springframework.core.io.Resource
Packages that use Resource
Package
Description
Support for registering the need for reflection, resources, java
serialization and proxies at runtime.
SPI interfaces and configuration-related convenience classes for bean factories.
Support package for Groovy-based bean definitions.
Support infrastructure for bean definition parsing.
Classes supporting the
org.springframework.beans.factory
package.Contains an abstract XML-based
BeanFactory
implementation,
including a standard "spring-beans" XSD.Classes supporting the org.springframework.context package,
such as abstract base classes for ApplicationContext
implementations and a MessageSource implementation.
Generic abstraction for (file-based) resources, used throughout the framework.
Generic abstraction for working with byte buffer implementations.
Support classes for Spring's resource abstraction.
Support classes for reading annotation and class-level metadata.
Contains a basic abstraction over client/server-side HTTP.
Multipart support.
Provides an HttpMessageConverter abstraction to convert between Java objects and HTTP input/output messages.
Defines the Spring JDBC configuration namespace.
Provides extensible support for initializing databases through scripts.
Support classes for the JDBC framework, used by the classes in the
jdbc.core and jdbc.object packages.
Provides a strategy for ObjectName creation.
JavaMail support for Spring's mail infrastructure.
Package providing integration of
Hibernate 5.x
with Spring concepts.
Package providing integration of JAXB
with Spring's O/X Mapping support.
Provides generic support classes for using Spring's O/X Mapping integration
within various scenario's.
Provides extensible support for initializing databases through scripts.
Support classes for the open source scheduler
Quartz,
allowing to set up Quartz Schedulers, JobDetails and
Triggers as beans in a Spring context.
Support classes for Spring's scripting package.
Common utilities used within the Spring TestContext Framework.
Contains built-in
ResponseCreator
implementations.Support classes for setting up
FreeMarker
within a Spring application context.
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.
This package contains classes used to determine the requested the media types in a request.
Classes supporting the
org.springframework.web.context
package,
such as WebApplicationContext implementations and various utility classes.Multipart resolution framework for handling file uploads.
Provides a foundation for both the reactive client and server subpackages.
Provides the types that make up Spring's functional web framework for Reactive environments.
Support classes for serving static resources.
Support classes for views based on the JSR-223 script engine abstraction
(as included in Java 6+), e.g.
Annotation-based setup for Spring MVC.
Provides the types that make up Spring's functional web framework for Servlet environments.
Support classes for serving static resources.
Provides standard View and ViewResolver implementations,
including abstract base classes for custom implementations.
Support classes for views based on the JSR-223 script engine abstraction
(as included in Java 6+), e.g.
-
Uses of Resource in org.springframework.aot.hint
Methods in org.springframework.aot.hint with parameters of type ResourceModifier and TypeMethodDescriptionvoid
ResourceHints.registerResource
(Resource resource) Register that the supplied resource should be made available at runtime. -
Uses of Resource in org.springframework.beans.factory.config
Methods in org.springframework.beans.factory.config with parameters of type ResourceModifier and TypeMethodDescriptionvoid
YamlProcessor.setResources
(Resource... resources) Set locations of YAMLresources
to be loaded. -
Uses of Resource in org.springframework.beans.factory.groovy
Methods in org.springframework.beans.factory.groovy with parameters of type ResourceModifier and TypeMethodDescriptionint
GroovyBeanDefinitionReader.loadBeanDefinitions
(Resource resource) Load bean definitions from the specified Groovy script or XML file. -
Uses of Resource in org.springframework.beans.factory.parsing
Methods in org.springframework.beans.factory.parsing that return ResourceModifier and TypeMethodDescriptionfinal Resource[]
ImportDefinition.getActualResources()
Location.getResource()
Get the resource with which this location is associated.final Resource
ReaderContext.getResource()
Methods in org.springframework.beans.factory.parsing with parameters of type ResourceModifier and TypeMethodDescriptionNullSourceExtractor.extractSource
(Object sourceCandidate, Resource definitionResource) This implementation simply returnsnull
for any input.PassThroughSourceExtractor.extractSource
(Object sourceCandidate, Resource definingResource) Simply returns the suppliedsourceCandidate
as-is.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.Constructors in org.springframework.beans.factory.parsing with parameters of type ResourceModifierConstructorDescriptionImportDefinition
(String importedResource, Resource[] actualResources, Object source) Create a new ImportDefinition.Create a new instance of theLocation
class.Create a new instance of theLocation
class.ReaderContext
(Resource resource, ProblemReporter problemReporter, ReaderEventListener eventListener, SourceExtractor sourceExtractor) Construct a newReaderContext
. -
Uses of Resource in org.springframework.beans.factory.support
Methods in org.springframework.beans.factory.support that return ResourceModifier and TypeMethodDescriptionAbstractBeanDefinition.getResource()
Return the resource that this bean definition came from.Methods in org.springframework.beans.factory.support with parameters of type ResourceModifier and TypeMethodDescriptionint
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) Deprecated.Load bean definitions from the specified properties file, using all property keys (i.e.int
PropertiesBeanDefinitionReader.loadBeanDefinitions
(Resource resource, String prefix) Deprecated.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).Method parameters in org.springframework.beans.factory.support with type arguments of type ResourceModifier and TypeMethodDescriptionint
AbstractBeanDefinitionReader.loadBeanDefinitions
(String location, Set<Resource> actualResources) Load bean definitions from the specified resource location. -
Uses of Resource in org.springframework.beans.factory.xml
Methods in org.springframework.beans.factory.xml with parameters of type ResourceModifier and TypeMethodDescriptionXmlBeanDefinitionReader.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.Constructors in org.springframework.beans.factory.xml with parameters of type ResourceModifierConstructorDescriptionXmlReaderContext
(Resource resource, ProblemReporter problemReporter, ReaderEventListener eventListener, SourceExtractor sourceExtractor, XmlBeanDefinitionReader reader, NamespaceHandlerResolver namespaceHandlerResolver) Construct a newXmlReaderContext
. -
Uses of Resource in org.springframework.context.support
Methods in org.springframework.context.support that return ResourceModifier and TypeMethodDescriptionprotected 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()
GenericApplicationContext.getResource
(String location) This implementation delegates to this context'sResourceLoader
if set, falling back to the default superclass behavior otherwise.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 otherwise.Methods in org.springframework.context.support with parameters of type ResourceModifier and TypeMethodDescriptionvoid
Load bean definitions from the given Groovy scripts or XML files.void
Load bean definitions from the given XML resources.protected Properties
ReloadableResourceBundleMessageSource.loadProperties
(Resource resource, String filename) Load the properties from the given resource.Constructors in org.springframework.context.support with parameters of type ResourceModifierConstructorDescriptionGenericGroovyApplicationContext
(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. -
Uses of Resource in org.springframework.core.codec
Methods in org.springframework.core.codec that return ResourceModifier and TypeMethodDescriptionResourceDecoder.decode
(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String, Object> hints) Methods in org.springframework.core.codec that return types with arguments of type ResourceModifier and TypeMethodDescriptionreactor.core.publisher.Flux<Resource>
ResourceDecoder.decode
(Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String, Object> hints) Methods in org.springframework.core.codec with parameters of type ResourceModifier and TypeMethodDescriptionprotected reactor.core.publisher.Flux<DataBuffer>
ResourceEncoder.encode
(Resource resource, DataBufferFactory bufferFactory, ResolvableType type, MimeType mimeType, Map<String, Object> hints) -
Uses of Resource in org.springframework.core.io
Subinterfaces of Resource in org.springframework.core.ioModifier and TypeInterfaceDescriptioninterface
Extended interface for a resource that is loaded from an enclosing 'context', e.g.interface
Extended interface for a resource that supports writing to it.Classes in org.springframework.core.io that implement ResourceModifier and TypeClassDescriptionclass
Abstract base class for resources which resolve URLs into File references, such asUrlResource
orClassPathResource
.class
Convenience base class forResource
implementations, pre-implementing typical behavior.class
Resource
implementation for a given byte array.class
Resource
implementation for class path resources.protected static class
ClassPathResource that explicitly expresses a context-relative path through implementing the ContextResource interface.class
SimpleResource
implementation that holds a resource description but does not point to an actually readable resource.class
class
Subclass ofUrlResource
which assumes file resolution, to the degree of implementing theWritableResource
interface for it.class
Resource
implementation for a givenInputStream
.class
class
Resource
implementation forjava.net.URL
locators.class
JBoss VFS basedResource
implementation.Methods in org.springframework.core.io that return ResourceModifier and TypeMethodDescriptionAbstractResource.createRelative
(String relativePath) This implementation throws a FileNotFoundException, assuming that relative resources cannot be created for this resource.ClassPathResource.createRelative
(String relativePath) This implementation creates aClassPathResource
, applying the given path relative to the path used to create this descriptor.DefaultResourceLoader.ClassPathContextResource.createRelative
(String relativePath) 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.FileUrlResource.createRelative
(String relativePath) PathResource.createRelative
(String relativePath) This implementation creates aPathResource
, applying the given path relative to the path of the underlying file of this resource descriptor.Resource.createRelative
(String relativePath) Create a resource relative to this resource.UrlResource.createRelative
(String relativePath) This implementation creates aUrlResource
, delegating toUrlResource.createRelativeURL(String)
for adapting the relative path.VfsResource.createRelative
(String relativePath) DefaultResourceLoader.getResource
(String location) ResourceLoader.getResource
(String location) Return aResource
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.ProtocolResolver.resolve
(String location, ResourceLoader resourceLoader) Resolve the given location against the given resource loader if this implementation's protocol matches.Methods in org.springframework.core.io that return types with arguments of type ResourceModifier and TypeMethodDescriptionDefaultResourceLoader.getResourceCache
(Class<T> valueType) Obtain a cache for the given value type, keyed byResource
. -
Uses of Resource in org.springframework.core.io.buffer
Methods in org.springframework.core.io.buffer with parameters of type ResourceModifier and TypeMethodDescriptionstatic 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. -
Uses of Resource in org.springframework.core.io.support
Methods in org.springframework.core.io.support that return ResourceModifier and TypeMethodDescriptionprotected Resource
PathMatchingResourcePatternResolver.convertClassLoaderURL
(URL url) Convert the given URL as returned from the configuredClassLoader
into aResource
, applying to path lookups without a pattern (seePathMatchingResourcePatternResolver.findAllClassPathResources(java.lang.String)
).protected Resource[]
PathMatchingResourcePatternResolver.findAllClassPathResources
(String location) Find all class location resources with the given location via the ClassLoader.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-stylePathMatcher
.final Resource
EncodedResource.getResource()
Return theResource
held by thisEncodedResource
.PathMatchingResourcePatternResolver.getResource
(String location) ResourceRegion.getResource()
Return the underlyingResource
for thisResourceRegion
.Resource[]
PathMatchingResourcePatternResolver.getResources
(String locationPattern) Resource[]
ResourcePatternResolver.getResources
(String locationPattern) Resolve the given location pattern intoResource
objects.protected Resource
PathMatchingResourcePatternResolver.resolveRootDirResource
(Resource original) Resolve the supplied root directory resource for path matching.Methods in org.springframework.core.io.support that return types with arguments of type ResourceModifier and TypeMethodDescriptionPathMatchingResourcePatternResolver.doFindAllClassPathResources
(String path) Find all class path resources with the given path via the configuredClassLoader
.PathMatchingResourcePatternResolver.doFindPathMatchingFileResources
(Resource rootDirResource, String subPattern) Find all resources in the file system of the supplied root directory that match the given location sub pattern via the Ant-stylePathMatcher
.PathMatchingResourcePatternResolver.doFindPathMatchingJarResources
(Resource rootDirResource, URL rootDirUrl, String subPattern) Find all resources in jar files that match the given location pattern via the Ant-stylePathMatcher
.PathMatchingResourcePatternResolver.findAllModulePathResources
(String locationPattern) Resolve the given location pattern intoResource
objects for all matching resources found in the module path.Methods in org.springframework.core.io.support with parameters of type ResourceModifier and TypeMethodDescriptionPathMatchingResourcePatternResolver.doFindPathMatchingFileResources
(Resource rootDirResource, String subPattern) Find all resources in the file system of the supplied root directory that match the given location sub pattern via the Ant-stylePathMatcher
.PathMatchingResourcePatternResolver.doFindPathMatchingJarResources
(Resource rootDirResource, URL rootDirUrl, String subPattern) Find all resources in jar files that match the given location pattern via the Ant-stylePathMatcher
.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) Determine if the given resource handle indicates a jar resource that thePathMatchingResourcePatternResolver.doFindPathMatchingJarResources(org.springframework.core.io.Resource, java.net.URL, java.lang.String)
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 supplied root directory 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.Method parameters in org.springframework.core.io.support with type arguments of type ResourceModifier and TypeMethodDescriptionprotected void
PathMatchingResourcePatternResolver.addAllClassLoaderJarRoots
(ClassLoader classLoader, Set<Resource> result) Search allURLClassLoader
URLs for jar file references and add each to the given set of resources in the form of a pointer to the root of the jar file content.protected void
PathMatchingResourcePatternResolver.addClassPathManifestEntries
(Set<Resource> result) Determine jar file references fromClass-Path
manifest entries (which are added to thejava.class.path
JVM system property by the system class loader) and add each to the given set of resources in the form of a pointer to the root of the jar file content.Constructors in org.springframework.core.io.support with parameters of type ResourceModifierConstructorDescriptionEncodedResource
(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
. -
Uses of Resource in org.springframework.core.type.classreading
Methods in org.springframework.core.type.classreading that return ResourceModifier and TypeMethodDescriptionMetadataReader.getResource()
Return the resource reference for the class file.Methods in org.springframework.core.type.classreading with parameters of type ResourceModifier and TypeMethodDescriptionCachingMetadataReaderFactory.getMetadataReader
(Resource resource) MetadataReaderFactory.getMetadataReader
(Resource resource) Obtain a MetadataReader for the given resource.SimpleMetadataReaderFactory.getMetadataReader
(Resource resource) -
Uses of Resource in org.springframework.http
Methods in org.springframework.http with parameters of type ResourceModifier and TypeMethodDescriptionMediaTypeFactory.getMediaType
(Resource resource) Determine a media type for the given resource, if possible.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. -
Uses of Resource in org.springframework.http.codec
Methods in org.springframework.http.codec with parameters of type ResourceModifier and TypeMethodDescriptionvoid
ResourceHttpMessageWriter.addHeaders
(ReactiveHttpOutputMessage message, Resource resource, MediaType contentType, Map<String, Object> hints) Adds the default headers for the given resource to the given message.Method parameters in org.springframework.http.codec with type arguments of type ResourceModifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
ResourceHttpMessageWriter.write
(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
(Publisher<? extends Resource> inputStream, ResolvableType elementType, MediaType mediaType, ReactiveHttpOutputMessage message, Map<String, Object> hints) -
Uses of Resource in org.springframework.http.codec.multipart
Methods in org.springframework.http.codec.multipart with parameters of type ResourceModifier and TypeMethodDescriptionstatic reactor.core.publisher.Flux<FilePartEvent>
Creates a stream ofFilePartEvent
objects based on the given name and resource.static reactor.core.publisher.Flux<FilePartEvent>
FilePartEvent.create
(String name, Resource resource, Consumer<HttpHeaders> headersConsumer) Creates a stream ofFilePartEvent
objects based on the given name and resource. -
Uses of Resource in org.springframework.http.converter
Methods in org.springframework.http.converter that return ResourceModifier and TypeMethodDescriptionprotected Resource
ResourceHttpMessageConverter.readInternal
(Class<? extends Resource> clazz, HttpInputMessage inputMessage) Methods in org.springframework.http.converter with parameters of type ResourceModifier and TypeMethodDescriptionvoid
ResourceHttpMessageConverter.addDefaultHeaders
(HttpOutputMessage message, Resource resource, MediaType contentType) Add the default headers for the given resource to the given message.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) Method parameters in org.springframework.http.converter with type arguments of type ResourceModifier and TypeMethodDescriptionprotected Resource
ResourceHttpMessageConverter.readInternal
(Class<? extends Resource> clazz, HttpInputMessage inputMessage) -
Uses of Resource in org.springframework.jdbc.config
Methods in org.springframework.jdbc.config that return ResourceModifier and TypeMethodDescriptionprotected Resource[]
SortedResourcesFactoryBean.createInstance()
-
Uses of Resource in org.springframework.jdbc.datasource.init
Methods in org.springframework.jdbc.datasource.init with parameters of type ResourceModifier and TypeMethodDescriptionvoid
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.Constructors in org.springframework.jdbc.datasource.init with parameters of type ResourceModifierConstructorDescriptionResourceDatabasePopulator
(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. -
Uses of Resource in org.springframework.jdbc.support
Methods in org.springframework.jdbc.support that return ResourceModifier and TypeMethodDescriptionprotected Resource
SQLErrorCodesFactory.loadResource
(String path) Load the given resource from the class path. -
Uses of Resource in org.springframework.jmx.export.naming
Methods in org.springframework.jmx.export.naming with parameters of type ResourceModifier and TypeMethodDescriptionvoid
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. -
Uses of Resource in org.springframework.mail.javamail
Methods in org.springframework.mail.javamail with parameters of type ResourceModifier and TypeMethodDescriptionvoid
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. -
Uses of Resource in org.springframework.orm.hibernate5
Methods in org.springframework.orm.hibernate5 with parameters of type ResourceModifier and TypeMethodDescriptionvoid
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". -
Uses of Resource in org.springframework.oxm.jaxb
Methods in org.springframework.oxm.jaxb with parameters of type ResourceModifier and TypeMethodDescriptionvoid
Set the schema resource to use for validation.void
Jaxb2Marshaller.setSchemas
(Resource... schemaResources) Set the schema resources to use for validation. -
Uses of Resource in org.springframework.oxm.support
Methods in org.springframework.oxm.support with parameters of type ResourceModifier and TypeMethodDescriptionstatic InputSource
SaxResourceUtils.createInputSource
(Resource resource) Create a SAXInputSource
from the given resource. -
Uses of Resource in org.springframework.r2dbc.connection.init
Methods in org.springframework.r2dbc.connection.init with parameters of type ResourceModifier and TypeMethodDescriptionvoid
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 reactor.core.publisher.Mono<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.Constructors in org.springframework.r2dbc.connection.init with parameters of type ResourceModifierConstructorDescriptionResourceDatabasePopulator
(boolean continueOnError, boolean ignoreFailedDrops, String sqlScriptEncoding, Resource... scripts) Construct a newResourceDatabasePopulator
with the supplied values.ResourceDatabasePopulator
(Resource... scripts) Create a newResourceDatabasePopulator
with default settings for the supplied scripts. -
Uses of Resource in org.springframework.scheduling.quartz
Methods in org.springframework.scheduling.quartz with parameters of type ResourceModifier and TypeMethodDescriptionvoid
SchedulerFactoryBean.setConfigLocation
(Resource configLocation) Set the location of the Quartz properties config file, for example as classpath resource "classpath:quartz.properties". -
Uses of Resource in org.springframework.scripting.support
Methods in org.springframework.scripting.support that return ResourceModifier and TypeMethodDescriptionfinal Resource
ResourceScriptSource.getResource()
Return theResource
to load the script from.Constructors in org.springframework.scripting.support with parameters of type ResourceModifierConstructorDescriptionResourceScriptSource
(Resource resource) Create a new ResourceScriptSource for the given resource. -
Uses of Resource in org.springframework.test.context.util
Methods in org.springframework.test.context.util that return ResourceModifier and TypeMethodDescriptionstatic Resource[]
TestContextResourceUtils.convertToResources
(ResourceLoader resourceLoader, String... paths) Convert the supplied paths to an array ofResource
handles using the givenResourceLoader
.Methods in org.springframework.test.context.util that return types with arguments of type ResourceModifier and TypeMethodDescriptionTestContextResourceUtils.convertToResourceList
(ResourceLoader resourceLoader, String... paths) Convert the supplied paths to a list ofResource
handles using the givenResourceLoader
. -
Uses of Resource in org.springframework.test.web.client.response
Methods in org.springframework.test.web.client.response with parameters of type ResourceModifier and TypeMethodDescriptionSet the body from aResource
.static DefaultResponseCreator
MockRestResponseCreators.withSuccess
(Resource body, MediaType contentType) ResponseCreator
for a 200 response (OK) content withResource
-based body. -
Uses of Resource in org.springframework.ui.freemarker
Methods in org.springframework.ui.freemarker with parameters of type ResourceModifier and TypeMethodDescriptionvoid
FreeMarkerConfigurationFactory.setConfigLocation
(Resource resource) Set the location of the FreeMarker config file. -
Uses of Resource in org.springframework.validation.beanvalidation
Methods in org.springframework.validation.beanvalidation with parameters of type ResourceModifier and TypeMethodDescriptionvoid
LocalValidatorFactoryBean.setMappingLocations
(Resource... mappingLocations) Specify resource locations to load XML constraint mapping files from, if any. -
Uses of Resource in org.springframework.web.accept
Methods in org.springframework.web.accept with parameters of type ResourceModifier and TypeMethodDescriptionPathExtensionContentNegotiationStrategy.getMediaTypeForResource
(Resource resource) Deprecated.ServletPathExtensionContentNegotiationStrategy.getMediaTypeForResource
(Resource resource) Deprecated.Extends the base classPathExtensionContentNegotiationStrategy.getMediaTypeForResource(org.springframework.core.io.Resource)
with the ability to also look up through the ServletContext. -
Uses of Resource in org.springframework.web.context.support
Classes in org.springframework.web.context.support that implement ResourceModifier and TypeClassDescriptionclass
Resource
implementation forServletContext
resources, interpreting relative paths within the web application root directory.Methods in org.springframework.web.context.support that return ResourceModifier and TypeMethodDescriptionServletContextResource.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 theServletContext
.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.Methods in org.springframework.web.context.support that return types with arguments of type ResourceModifier and TypeMethodDescriptionServletContextResourcePatternResolver.doFindPathMatchingFileResources
(Resource rootDirResource, String subPattern) Overridden version which checks for ServletContextResource and usesServletContext.getResourcePaths
to find matching resources below the web application root directory.Methods in org.springframework.web.context.support with parameters of type ResourceModifier and TypeMethodDescriptionServletContextResourcePatternResolver.doFindPathMatchingFileResources
(Resource rootDirResource, String subPattern) Overridden version which checks for ServletContextResource and usesServletContext.getResourcePaths
to find matching resources below the web application root directory.Method parameters in org.springframework.web.context.support with type arguments of type ResourceModifier and TypeMethodDescriptionprotected 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. -
Uses of Resource in org.springframework.web.multipart
Methods in org.springframework.web.multipart that return ResourceModifier and TypeMethodDescriptiondefault Resource
MultipartFile.getResource()
Return a Resource representation of this MultipartFile. -
Uses of Resource in org.springframework.web.reactive.function
Methods in org.springframework.web.reactive.function with type parameters of type ResourceModifier and TypeMethodDescriptionstatic <T extends Resource>
BodyInserter<T,ReactiveHttpOutputMessage> BodyInserters.fromResource
(T resource) Inserter to write the givenResource
. -
Uses of Resource in org.springframework.web.reactive.function.server
Methods in org.springframework.web.reactive.function.server that return types with arguments of type ResourceModifier and TypeMethodDescriptionstatic Function<ServerRequest,
reactor.core.publisher.Mono<Resource>> RouterFunctions.resourceLookupFunction
(String pattern, Resource location) Returns the resource lookup function used byRouterFunctions.resources(String, Resource)
.Methods in org.springframework.web.reactive.function.server with parameters of type ResourceModifier and TypeMethodDescriptionstatic Function<ServerRequest,
reactor.core.publisher.Mono<Resource>> RouterFunctions.resourceLookupFunction
(String pattern, Resource location) Returns the resource lookup function used byRouterFunctions.resources(String, Resource)
.Route requests that match the given pattern to resources relative to the given root location.static RouterFunction<ServerResponse>
Route requests that match the given pattern to resources relative to the given root location.Method parameters in org.springframework.web.reactive.function.server with type arguments of type ResourceModifier and TypeMethodDescriptionRouterFunctions.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. -
Uses of Resource in org.springframework.web.reactive.resource
Subinterfaces of Resource in org.springframework.web.reactive.resourceModifier and TypeInterfaceDescriptioninterface
Extended interface for aResource
to be written to an HTTP response.Classes in org.springframework.web.reactive.resource that implement ResourceModifier and TypeClassDescriptionclass
An extension ofByteArrayResource
that aResourceTransformer
can use to represent an original resource preserving all other information except the content.Methods in org.springframework.web.reactive.resource that return ResourceMethods in org.springframework.web.reactive.resource that return types with arguments of type ResourceModifier and TypeMethodDescriptionResourceWebHandler.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>
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>
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.Methods in org.springframework.web.reactive.resource with parameters of type ResourceModifier and TypeMethodDescriptionprotected boolean
PathResourceResolver.checkResource
(Resource resource, Resource location) Perform additional checks on a resolved resource beyond checking whether the resource 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>
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.Method parameters in org.springframework.web.reactive.resource with type arguments of type ResourceModifier and TypeMethodDescriptionreactor.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>
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>
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.Constructors in org.springframework.web.reactive.resource with parameters of type Resource -
Uses of Resource in org.springframework.web.reactive.result.view.script
Methods in org.springframework.web.reactive.result.view.script that return ResourceModifier and TypeMethodDescriptionprotected Resource
ScriptTemplateView.getResource
(String location) -
Uses of Resource in org.springframework.web.servlet.config.annotation
Methods in org.springframework.web.servlet.config.annotation with parameters of type ResourceModifier and TypeMethodDescriptionResourceHandlerRegistration.addResourceLocations
(Resource... locations) Configure locations to serve static resources from based on pre-resolvedResource
references. -
Uses of Resource in org.springframework.web.servlet.function
Methods in org.springframework.web.servlet.function that return types with arguments of type ResourceModifier and TypeMethodDescriptionstatic Function<ServerRequest,
Optional<Resource>> RouterFunctions.resourceLookupFunction
(String pattern, Resource location) Returns the resource lookup function used byRouterFunctions.resources(String, Resource)
.Methods in org.springframework.web.servlet.function with parameters of type ResourceModifier and TypeMethodDescriptionstatic Function<ServerRequest,
Optional<Resource>> RouterFunctions.resourceLookupFunction
(String pattern, Resource location) Returns the resource lookup function used byRouterFunctions.resources(String, Resource)
.Route requests that match the given pattern to resources relative to the given root location.static RouterFunction<ServerResponse>
Route requests that match the given pattern to resources relative to the given root location.Method parameters in org.springframework.web.servlet.function with type arguments of type ResourceModifier and TypeMethodDescriptionRouterFunctions.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. -
Uses of Resource in org.springframework.web.servlet.resource
Subinterfaces of Resource in org.springframework.web.servlet.resourceModifier and TypeInterfaceDescriptioninterface
Extended interface for aResource
to be written to an HTTP response.Classes in org.springframework.web.servlet.resource that implement ResourceModifier and TypeClassDescriptionclass
An extension ofByteArrayResource
that aResourceTransformer
can use to represent an original resource preserving all other information except the content.Methods in org.springframework.web.servlet.resource that return ResourceModifier and TypeMethodDescriptionResource[]
PathResourceResolver.getAllowedLocations()
protected Resource
PathResourceResolver.getResource
(String resourcePath, Resource location) Find the resource under the given location.protected Resource
ResourceHttpRequestHandler.getResource
(HttpServletRequest request) AbstractResourceResolver.resolveResource
(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain) 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.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
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) CachingResourceTransformer.transform
(HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain) CssLinkResourceTransformer.transform
(HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain) ResourceTransformer.transform
(HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain) Transform the given resource.ResourceTransformerChain.transform
(HttpServletRequest request, Resource resource) Transform the given resource.Methods in org.springframework.web.servlet.resource that return types with arguments of type ResourceModifier and TypeMethodDescriptionPathResourceResolver.getLocationCharsets()
Return charsets associated with static resource locations.ResourceHttpRequestHandler.getLocations()
Return the configuredList
ofResource
locations including both String-based locations provided viasetLocationValues
and pre-resolvedResource
locations provided viasetLocations
.Methods in org.springframework.web.servlet.resource with parameters of type ResourceModifier and TypeMethodDescriptionprotected boolean
PathResourceResolver.checkResource
(Resource resource, Resource location) Perform additional checks on a resolved resource beyond checking whether the resource 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.ContentVersionStrategy.getResourceVersion
(Resource resource) FixedVersionStrategy.getResourceVersion
(Resource resource) 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.CachingResourceTransformer.transform
(HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain) CssLinkResourceTransformer.transform
(HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain) ResourceTransformer.transform
(HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain) Transform the given resource.ResourceTransformerChain.transform
(HttpServletRequest request, Resource resource) Transform the given resource.Method parameters in org.springframework.web.servlet.resource with type arguments of type ResourceModifier and TypeMethodDescriptionAbstractResourceResolver.resolveResource
(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain) 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.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
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) AbstractResourceResolver.resolveUrlPath
(String resourceUrlPath, List<? extends Resource> locations, ResourceResolverChain chain) 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.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
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) Configure locations to serve resources from as pre-resourced Resource's.Constructors in org.springframework.web.servlet.resource with parameters of type Resource -
Uses of Resource in org.springframework.web.servlet.view
Methods in org.springframework.web.servlet.view with parameters of type ResourceModifier and TypeMethodDescriptionvoid
XmlViewResolver.setLocation
(Resource location) Deprecated.Set the location of the XML file that defines the view beans. -
Uses of Resource in org.springframework.web.servlet.view.script
Methods in org.springframework.web.servlet.view.script that return ResourceModifier and TypeMethodDescriptionprotected Resource
ScriptTemplateView.getResource
(String location)