publicPathMatchingResourcePatternResolver(ResourceLoader resourceLoader){
Assert.notNull(resourceLoader,"ResourceLoader must not be null");//设置Spring的资源加载器this.resourceLoader = resourceLoader;}
/**
* 重载方法,调用loadBeanDefinitions(String);
* @param locations the resource locations, to be loaded with the ResourceLoader
* (or ResourcePatternResolver) of this bean definition reader
* @return
* @throws BeanDefinitionStoreException
*/@OverridepublicintloadBeanDefinitions(String... locations)throwsBeanDefinitionStoreException{
loadBeanDefinitions(location);}
/**
* 重载方法,调用下面的loadBeanDefinitions(String, Set<Resource>);方法
* @param location the resource location, to be loaded with the ResourceLoader
* (or ResourcePatternResolver) of this bean definition reader
* @return
* @throws BeanDefinitionStoreException
*/@OverridepublicintloadBeanDefinitions(String location)throwsBeanDefinitionStoreException{
returnloadBeanDefinitions(location,null);}
/**
* 使用标准的JAXP将载入的Bean定义资源转换成document对象
* @param inputSource the source of the document that is to be loaded
* @param entityResolver the resolver that is to be used to resolve any entities
* @param errorHandler used to report any errors during document loading
* @param validationMode the type of validation
* {@link org.springframework.util.xml.XmlValidationModeDetector#VALIDATION_DTD DTD}
* or {@link org.springframework.util.xml.XmlValidationModeDetector#VALIDATION_XSD XSD})
* @param namespaceAware {@code true} if support for XML namespaces is to be provided
* @return
* @throws Exception
*/@OverridepublicDocumentloadDocument(InputSource inputSource,EntityResolver entityResolver,ErrorHandler errorHandler,int validationMode,boolean namespaceAware)throwsException{
}