类 SortedResourcesFactoryBean
- java.lang.Object
- org.springframework.beans.factory.config.AbstractFactoryBean<Resource[]>
- org.springframework.jdbc.config.SortedResourcesFactoryBean
- 所有已实现的接口:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<Resource[]>
,InitializingBean
,ResourceLoaderAware
public class SortedResourcesFactoryBean extends AbstractFactoryBean<Resource[]> implements ResourceLoaderAware
FactoryBean
implementation that takes a list of location Strings and creates a sorted array ofResource
instances.- 从以下版本开始:
- 3.0
- 作者:
- Dave Syer, Juergen Hoeller, Christian Dupuis
字段概要
从类继承的字段 org.springframework.beans.factory.config.AbstractFactoryBean
logger
构造器概要
构造器 构造器 说明 SortedResourcesFactoryBean(List<String> locations)
SortedResourcesFactoryBean(ResourceLoader resourceLoader, List<String> locations)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected Resource[]
createInstance()
Template method that subclasses must override to construct the object returned by this factory.Class<? extends Resource[]>
getObjectType()
This abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.void
setResourceLoader(ResourceLoader resourceLoader)
Set the ResourceLoader that this object runs in.从类继承的方法 org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
构造器详细资料
SortedResourcesFactoryBean
public SortedResourcesFactoryBean(List<String> locations)
SortedResourcesFactoryBean
public SortedResourcesFactoryBean(ResourceLoader resourceLoader, List<String> locations)
方法详细资料
setResourceLoader
public void setResourceLoader(ResourceLoader resourceLoader)
从接口复制的说明:ResourceLoaderAware
Set the ResourceLoader that this object runs in.This might be a ResourcePatternResolver, which can be checked through
instanceof ResourcePatternResolver
. See also theResourcePatternUtils.getResourcePatternResolver
method.Invoked after population of normal bean properties but before an init callback like InitializingBean's
afterPropertiesSet
or a custom init-method. Invoked before ApplicationContextAware'ssetApplicationContext
.- 指定者:
setResourceLoader
在接口中ResourceLoaderAware
- 参数:
resourceLoader
- the ResourceLoader object to be used by this object- 另请参阅:
ResourcePatternResolver
,ResourcePatternUtils.getResourcePatternResolver(org.springframework.core.io.ResourceLoader)
getObjectType
public Class<? extends Resource[]> getObjectType()
从类复制的说明:AbstractFactoryBean
This abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.- 指定者:
getObjectType
在接口中FactoryBean<Resource[]>
- 指定者:
getObjectType
在类中AbstractFactoryBean<Resource[]>
- 返回:
- the type of object that this FactoryBean creates, or
null
if not known at the time of the call - 另请参阅:
FactoryBean.getObjectType()
createInstance
protected Resource[] createInstance() throws Exception
从类复制的说明:AbstractFactoryBean
Template method that subclasses must override to construct the object returned by this factory.Invoked on initialization of this FactoryBean in case of a singleton; else, on each
AbstractFactoryBean.getObject()
call.- 指定者:
createInstance
在类中AbstractFactoryBean<Resource[]>
- 返回:
- the object returned by this factory
- 抛出:
Exception
- if an exception occurred during object creation- 另请参阅:
AbstractFactoryBean.getObject()