接口的使用
org.springframework.core.io.ResourceLoader
使用ResourceLoader的程序包 程序包 说明 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.beans.support Classes supporting the org.springframework.beans package, such as utility classes for sorting and holding lists of beans.org.springframework.context This package builds on the beans package to add support for message sources and for the Observer design pattern, and the ability for application objects to obtain resources using a consistent API.org.springframework.context.annotation Annotation support for the Application Context, including JSR-250 "common" annotations, component-scanning, and Java-based metadata for creating Spring-managed objects.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.io Generic abstraction for (file-based) resources, used throughout the framework.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.jca.context Integration package that allows for deploying a Spring application context as a JCA 1.7 compliant RAR file.org.springframework.jdbc.config Defines the Spring JDBC configuration namespace.org.springframework.jdbc.datasource.embedded Provides extensible support for creating embedded database instances.org.springframework.mock.web A comprehensive set of Servlet API 4.0 mock objects, targeted at usage with Spring's Web MVC framework.org.springframework.orm.hibernate5 Package providing integration of Hibernate 5.x with Spring concepts.org.springframework.orm.jpa Package providing integration of JPA (Java Persistence API) with Spring concepts.org.springframework.orm.jpa.persistenceunit Internal support for managing JPA persistence units.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.support Support classes for the Spring TestContext Framework.org.springframework.test.context.util Common utilities used within the Spring TestContext Framework.org.springframework.ui.freemarker Support classes for setting up FreeMarker within a Spring application context.org.springframework.web.context Contains a variant of the application context interface for web applications, and the ContextLoaderListener that bootstraps a root web application context.org.springframework.web.context.support Classes supporting theorg.springframework.web.context
package, such as WebApplicationContext implementations and various utility classes.org.springframework.web.reactive.config Spring WebFlux configuration infrastructure.org.springframework.web.reactive.resource Support classes for serving static resources.org.springframework.beans.factory.support中ResourceLoader的使用
返回ResourceLoader的org.springframework.beans.factory.support中的方法 修饰符和类型 方法 说明 ResourceLoader
AbstractBeanDefinitionReader. getResourceLoader()
ResourceLoader
BeanDefinitionReader. getResourceLoader()
Return the resource loader to use for resource locations.参数类型为ResourceLoader的org.springframework.beans.factory.support中的方法 修饰符和类型 方法 说明 void
AbstractBeanDefinitionReader. setResourceLoader(ResourceLoader resourceLoader)
Set the ResourceLoader to use for resource locations.org.springframework.beans.factory.xml中ResourceLoader的使用
返回ResourceLoader的org.springframework.beans.factory.xml中的方法 修饰符和类型 方法 说明 ResourceLoader
XmlReaderContext. getResourceLoader()
Return the resource loader to use, if any.参数类型为ResourceLoader的org.springframework.beans.factory.xml中的构造器 构造器 说明 ResourceEntityResolver(ResourceLoader resourceLoader)
Create a ResourceEntityResolver for the specified ResourceLoader (usually, an ApplicationContext).org.springframework.beans.support中ResourceLoader的使用
参数类型为ResourceLoader的org.springframework.beans.support中的构造器 构造器 说明 ResourceEditorRegistrar(ResourceLoader resourceLoader, PropertyResolver propertyResolver)
Create a new ResourceEditorRegistrar for the givenResourceLoader
andPropertyResolver
.org.springframework.context中ResourceLoader的使用
org.springframework.context中ResourceLoader的子接口 修饰符和类型 接口 说明 interface
ApplicationContext
Central interface to provide configuration for an application.interface
ConfigurableApplicationContext
SPI interface to be implemented by most if not all application contexts.参数类型为ResourceLoader的org.springframework.context中的方法 修饰符和类型 方法 说明 void
ResourceLoaderAware. setResourceLoader(ResourceLoader resourceLoader)
Set the ResourceLoader that this object runs in.org.springframework.context.annotation中ResourceLoader的使用
实现ResourceLoader的org.springframework.context.annotation中的类 修饰符和类型 类 说明 class
AnnotationConfigApplicationContext
Standalone application context, accepting component classes as input — in particular@Configuration
-annotated classes, but also plain@Component
types and JSR-330 compliant classes usingjavax.inject
annotations.返回ResourceLoader的org.springframework.context.annotation中的方法 修饰符和类型 方法 说明 ResourceLoader
ClassPathScanningCandidateComponentProvider. getResourceLoader()
Return the ResourceLoader that this component provider uses.ResourceLoader
ConditionContext. getResourceLoader()
Return theResourceLoader
currently being used.参数类型为ResourceLoader的org.springframework.context.annotation中的方法 修饰符和类型 方法 说明 void
ClassPathScanningCandidateComponentProvider. setResourceLoader(ResourceLoader resourceLoader)
Set theResourceLoader
to use for resource locations.void
ConfigurationClassPostProcessor. setResourceLoader(ResourceLoader resourceLoader)
参数类型为ResourceLoader的org.springframework.context.annotation中的构造器 构造器 说明 ClassPathBeanDefinitionScanner(BeanDefinitionRegistry registry, boolean useDefaultFilters, Environment environment, ResourceLoader resourceLoader)
Create a newClassPathBeanDefinitionScanner
for the given bean factory and using the givenEnvironment
when evaluating bean definition profile metadata.org.springframework.context.support中ResourceLoader的使用
实现ResourceLoader的org.springframework.context.support中的类 修饰符和类型 类 说明 class
AbstractApplicationContext
Abstract implementation of theApplicationContext
interface.class
AbstractRefreshableApplicationContext
Base class forApplicationContext
implementations which are supposed to support multiple calls toAbstractApplicationContext.refresh()
, creating a new internal bean factory instance every time.class
AbstractRefreshableConfigApplicationContext
AbstractRefreshableApplicationContext
subclass that adds common handling of specified config locations.class
AbstractXmlApplicationContext
Convenient base class forApplicationContext
implementations, drawing configuration from XML documents containing bean definitions understood by anXmlBeanDefinitionReader
.class
ClassPathXmlApplicationContext
Standalone XML application context, taking the context definition files from the class path, interpreting plain paths as class path resource names that include the package path (e.g.class
FileSystemXmlApplicationContext
Standalone XML application context, taking the context definition files from the file system or from URLs, interpreting plain paths as relative file system locations (e.g.class
GenericApplicationContext
Generic ApplicationContext implementation that holds a single internalDefaultListableBeanFactory
instance and does not assume a specific bean definition format.class
GenericGroovyApplicationContext
AnApplicationContext
implementation that extendsGenericApplicationContext
and implementsGroovyObject
such that beans can be retrieved with the dot de-reference syntax instead of usingAbstractApplicationContext.getBean(java.lang.String)
.class
GenericXmlApplicationContext
Convenient application context with built-in XML support.class
StaticApplicationContext
ApplicationContext
implementation which supports programmatic registration of beans and messages, rather than reading bean definitions from external configuration sources.参数类型为ResourceLoader的org.springframework.context.support中的方法 修饰符和类型 方法 说明 void
GenericApplicationContext. setResourceLoader(ResourceLoader resourceLoader)
Set a ResourceLoader to use for this context.void
ReloadableResourceBundleMessageSource. setResourceLoader(ResourceLoader resourceLoader)
Set the ResourceLoader to use for loading bundle properties files.org.springframework.core.io中ResourceLoader的使用
实现ResourceLoader的org.springframework.core.io中的类 修饰符和类型 类 说明 class
ClassRelativeResourceLoader
ResourceLoader
implementation that interprets plain resource paths as relative to a givenjava.lang.Class
.class
DefaultResourceLoader
Default implementation of theResourceLoader
interface.class
FileSystemResourceLoader
ResourceLoader
implementation that resolves plain paths as file system resources rather than as class path resources (the latter isDefaultResourceLoader
's default strategy).参数类型为ResourceLoader的org.springframework.core.io中的方法 修饰符和类型 方法 说明 Resource
ProtocolResolver. resolve(String location, ResourceLoader resourceLoader)
Resolve the given location against the given resource loader if this implementation's protocol matches.参数类型为ResourceLoader的org.springframework.core.io中的构造器 构造器 说明 ResourceEditor(ResourceLoader resourceLoader, PropertyResolver propertyResolver)
Create a new instance of theResourceEditor
class using the givenResourceLoader
andPropertyResolver
.ResourceEditor(ResourceLoader resourceLoader, PropertyResolver propertyResolver, boolean ignoreUnresolvablePlaceholders)
Create a new instance of theResourceEditor
class using the givenResourceLoader
.org.springframework.core.io.support中ResourceLoader的使用
org.springframework.core.io.support中ResourceLoader的子接口 修饰符和类型 接口 说明 interface
ResourcePatternResolver
Strategy interface for resolving a location pattern (for example, an Ant-style path pattern) into Resource objects.实现ResourceLoader的org.springframework.core.io.support中的类 修饰符和类型 类 说明 class
PathMatchingResourcePatternResolver
AResourcePatternResolver
implementation that is able to resolve a specified resource location path into one or more matching Resources.返回ResourceLoader的org.springframework.core.io.support中的方法 修饰符和类型 方法 说明 ResourceLoader
PathMatchingResourcePatternResolver. getResourceLoader()
Return the ResourceLoader that this pattern resolver works with.参数类型为ResourceLoader的org.springframework.core.io.support中的方法 修饰符和类型 方法 说明 static ResourcePatternResolver
ResourcePatternUtils. getResourcePatternResolver(ResourceLoader resourceLoader)
Return a defaultResourcePatternResolver
for the givenResourceLoader
.参数类型为ResourceLoader的org.springframework.core.io.support中的构造器 构造器 说明 LocalizedResourceHelper(ResourceLoader resourceLoader)
Create a new LocalizedResourceHelper with the given ResourceLoader.PathMatchingResourcePatternResolver(ResourceLoader resourceLoader)
Create a new PathMatchingResourcePatternResolver.org.springframework.core.type.classreading中ResourceLoader的使用
返回ResourceLoader的org.springframework.core.type.classreading中的方法 修饰符和类型 方法 说明 ResourceLoader
SimpleMetadataReaderFactory. getResourceLoader()
Return the ResourceLoader that this MetadataReaderFactory has been constructed with.参数类型为ResourceLoader的org.springframework.core.type.classreading中的构造器 构造器 说明 CachingMetadataReaderFactory(ResourceLoader resourceLoader)
Create a new CachingMetadataReaderFactory for the givenResourceLoader
, using a shared resource cache if supported or a local resource cache otherwise.SimpleMetadataReaderFactory(ResourceLoader resourceLoader)
Create a new SimpleMetadataReaderFactory for the given resource loader.org.springframework.jca.context中ResourceLoader的使用
实现ResourceLoader的org.springframework.jca.context中的类 修饰符和类型 类 说明 class
ResourceAdapterApplicationContext
ApplicationContext
implementation for a JCA ResourceAdapter.org.springframework.jdbc.config中ResourceLoader的使用
参数类型为ResourceLoader的org.springframework.jdbc.config中的方法 修饰符和类型 方法 说明 void
SortedResourcesFactoryBean. setResourceLoader(ResourceLoader resourceLoader)
参数类型为ResourceLoader的org.springframework.jdbc.config中的构造器 构造器 说明 SortedResourcesFactoryBean(ResourceLoader resourceLoader, List<String> locations)
org.springframework.jdbc.datasource.embedded中ResourceLoader的使用
参数类型为ResourceLoader的org.springframework.jdbc.datasource.embedded中的构造器 构造器 说明 EmbeddedDatabaseBuilder(ResourceLoader resourceLoader)
Create a new embedded database builder with the givenResourceLoader
.org.springframework.mock.web中ResourceLoader的使用
参数类型为ResourceLoader的org.springframework.mock.web中的构造器 构造器 说明 MockServletContext(String resourceBasePath, ResourceLoader resourceLoader)
Create a newMockServletContext
using the supplied resource base path and resource loader.MockServletContext(ResourceLoader resourceLoader)
Create a newMockServletContext
, using the specifiedResourceLoader
and no base path.org.springframework.orm.hibernate5中ResourceLoader的使用
返回ResourceLoader的org.springframework.orm.hibernate5中的方法 修饰符和类型 方法 说明 ResourceLoader
LocalSessionFactoryBean. getResourceLoader()
Determine the SpringResourceLoader
to use for Hibernate metadata.参数类型为ResourceLoader的org.springframework.orm.hibernate5中的方法 修饰符和类型 方法 说明 void
LocalSessionFactoryBean. setResourceLoader(ResourceLoader resourceLoader)
Specify a SpringResourceLoader
to use for Hibernate metadata.参数类型为ResourceLoader的org.springframework.orm.hibernate5中的构造器 构造器 说明 LocalSessionFactoryBuilder(DataSource dataSource, ResourceLoader resourceLoader)
Create a new LocalSessionFactoryBuilder for the given DataSource.LocalSessionFactoryBuilder(DataSource dataSource, ResourceLoader resourceLoader, org.hibernate.boot.MetadataSources metadataSources)
Create a new LocalSessionFactoryBuilder for the given DataSource.org.springframework.orm.jpa中ResourceLoader的使用
参数类型为ResourceLoader的org.springframework.orm.jpa中的方法 修饰符和类型 方法 说明 void
LocalContainerEntityManagerFactoryBean. setResourceLoader(ResourceLoader resourceLoader)
org.springframework.orm.jpa.persistenceunit中ResourceLoader的使用
参数类型为ResourceLoader的org.springframework.orm.jpa.persistenceunit中的方法 修饰符和类型 方法 说明 void
DefaultPersistenceUnitManager. setResourceLoader(ResourceLoader resourceLoader)
org.springframework.scheduling.quartz中ResourceLoader的使用
声明为ResourceLoader的org.springframework.scheduling.quartz中的字段 修饰符和类型 字段 说明 protected ResourceLoader
SchedulerAccessor. resourceLoader
返回ResourceLoader的org.springframework.scheduling.quartz中的方法 修饰符和类型 方法 说明 static ResourceLoader
SchedulerFactoryBean. getConfigTimeResourceLoader()
Return theResourceLoader
for the currently configured Quartz Scheduler, to be used byResourceLoaderClassLoadHelper
.参数类型为ResourceLoader的org.springframework.scheduling.quartz中的方法 修饰符和类型 方法 说明 void
SchedulerAccessor. setResourceLoader(ResourceLoader resourceLoader)
参数类型为ResourceLoader的org.springframework.scheduling.quartz中的构造器 构造器 说明 ResourceLoaderClassLoadHelper(ResourceLoader resourceLoader)
Create a new ResourceLoaderClassLoadHelper for the given ResourceLoader.org.springframework.scripting.support中ResourceLoader的使用
参数类型为ResourceLoader的org.springframework.scripting.support中的方法 修饰符和类型 方法 说明 protected ScriptSource
ScriptFactoryPostProcessor. convertToScriptSource(String beanName, String scriptSourceLocator, ResourceLoader resourceLoader)
Convert the given script source locator to a ScriptSource instance.void
ScriptFactoryPostProcessor. setResourceLoader(ResourceLoader resourceLoader)
org.springframework.test.context.support中ResourceLoader的使用
参数类型为ResourceLoader的org.springframework.test.context.support中的方法 修饰符和类型 方法 说明 static void
TestPropertySourceUtils. addPropertiesFilesToEnvironment(ConfigurableEnvironment environment, ResourceLoader resourceLoader, String... locations)
org.springframework.test.context.util中ResourceLoader的使用
参数类型为ResourceLoader的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
.static Resource[]
TestContextResourceUtils. convertToResources(ResourceLoader resourceLoader, String... paths)
Convert the supplied paths to an array ofResource
handles using the givenResourceLoader
.org.springframework.ui.freemarker中ResourceLoader的使用
返回ResourceLoader的org.springframework.ui.freemarker中的方法 修饰符和类型 方法 说明 protected ResourceLoader
FreeMarkerConfigurationFactory. getResourceLoader()
Return the Spring ResourceLoader to use for loading FreeMarker template files.参数类型为ResourceLoader的org.springframework.ui.freemarker中的方法 修饰符和类型 方法 说明 void
FreeMarkerConfigurationFactory. setResourceLoader(ResourceLoader resourceLoader)
Set the Spring ResourceLoader to use for loading FreeMarker template files.参数类型为ResourceLoader的org.springframework.ui.freemarker中的构造器 构造器 说明 SpringTemplateLoader(ResourceLoader resourceLoader, String templateLoaderPath)
Create a new SpringTemplateLoader.org.springframework.web.context中ResourceLoader的使用
org.springframework.web.context中ResourceLoader的子接口 修饰符和类型 接口 说明 interface
ConfigurableWebApplicationContext
Interface to be implemented by configurable web application contexts.interface
WebApplicationContext
Interface to provide configuration for a web application.org.springframework.web.context.support中ResourceLoader的使用
实现ResourceLoader的org.springframework.web.context.support中的类 修饰符和类型 类 说明 class
AbstractRefreshableWebApplicationContext
AbstractRefreshableApplicationContext
subclass which implements theConfigurableWebApplicationContext
interface for web environments.class
AnnotationConfigWebApplicationContext
WebApplicationContext
implementation which accepts component classes as input — in particular@Configuration
-annotated classes, but also plain@Component
classes and JSR-330 compliant classes usingjavax.inject
annotations.class
GenericWebApplicationContext
Subclass ofGenericApplicationContext
, suitable for web environments.class
GroovyWebApplicationContext
WebApplicationContext
implementation which takes its configuration from Groovy bean definition scripts and/or XML files, as understood by aGroovyBeanDefinitionReader
.class
ServletContextResourceLoader
ResourceLoader implementation that resolves paths as ServletContext resources, for use outside a WebApplicationContext (for example, in an HttpServletBean or GenericFilterBean subclass).class
ServletContextResourcePatternResolver
ServletContext-aware subclass ofPathMatchingResourcePatternResolver
, able to find matching resources below the web application root directory viaServletContext.getResourcePaths(java.lang.String)
.class
StaticWebApplicationContext
StaticWebApplicationContext
implementation for testing.class
XmlWebApplicationContext
WebApplicationContext
implementation which takes its configuration from XML documents, understood by anXmlBeanDefinitionReader
.参数类型为ResourceLoader的org.springframework.web.context.support中的构造器 构造器 说明 ServletContextResourcePatternResolver(ResourceLoader resourceLoader)
Create a new ServletContextResourcePatternResolver.org.springframework.web.reactive.config中ResourceLoader的使用
参数类型为ResourceLoader的org.springframework.web.reactive.config中的构造器 构造器 说明 ResourceHandlerRegistration(ResourceLoader resourceLoader, String... pathPatterns)
Create aResourceHandlerRegistration
instance.ResourceHandlerRegistry(ResourceLoader resourceLoader)
Create a new resource handler registry for the given resource loader (typically an application context).org.springframework.web.reactive.resource中ResourceLoader的使用
参数类型为ResourceLoader的org.springframework.web.reactive.resource中的方法 修饰符和类型 方法 说明 void
ResourceWebHandler. setResourceLoader(ResourceLoader resourceLoader)
Provide the ResourceLoader to loadlocation values
with.