Class SchemaTypeAwareBeanDefinitionDocumentReader
java.lang.Object
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader
net.shibboleth.shared.spring.custom.SchemaTypeAwareBeanDefinitionDocumentReader
- All Implemented Interfaces:
BeanDefinitionDocumentReader
- Direct Known Subclasses:
EmbeddedAndSchemaAwareReader
public class SchemaTypeAwareBeanDefinitionDocumentReader
extends DefaultBeanDefinitionDocumentReader
An extension to the standard
DefaultBeanDefinitionDocumentReader that uses a
SchemaTypeAwareBeanDefinitionParserDelegate delegate for processing bean definitions.
This class was extended, per IDP-1640, to hijack another bug in Spring's reader class that prevents imports that don't start with file:// from being handled as absolute file paths if they exist.
-
Field Summary
Fields inherited from class org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader
ALIAS_ATTRIBUTE, ALIAS_ELEMENT, BEAN_ELEMENT, IMPORT_ELEMENT, logger, NAME_ATTRIBUTE, NESTED_BEANS_ELEMENT, PROFILE_ATTRIBUTE, RESOURCE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BeanDefinitionParserDelegatecreateDelegate(XmlReaderContext readerContext, Element root, BeanDefinitionParserDelegate parentDelegate) protected voidThis override prevents the default behavior from kicking in if the original resource location is directly usable by the installedResourceLoader.Methods inherited from class org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader
doRegisterBeanDefinitions, extractSource, getReaderContext, parseBeanDefinitions, postProcessXml, preProcessXml, processAliasRegistration, processBeanDefinition, registerBeanDefinitions
-
Constructor Details
-
SchemaTypeAwareBeanDefinitionDocumentReader
public SchemaTypeAwareBeanDefinitionDocumentReader()
-
-
Method Details
-
importBeanDefinitionResource
This override prevents the default behavior from kicking in if the original resource location is directly usable by the installedResourceLoader.This is needed because Spring's internal behavior around imports unfortunately ignores the whole ResourceLoader hook. Arguably a bug.
- Overrides:
importBeanDefinitionResourcein classDefaultBeanDefinitionDocumentReader
-
createDelegate
@Nonnull protected BeanDefinitionParserDelegate createDelegate(@Nonnull XmlReaderContext readerContext, @Nonnull Element root, @Nullable BeanDefinitionParserDelegate parentDelegate) - Overrides:
createDelegatein classDefaultBeanDefinitionDocumentReader
-