Search in sources :

Example 1 with PassThroughSourceExtractor

use of org.springframework.beans.factory.parsing.PassThroughSourceExtractor in project spring-framework by spring-projects.

the class EventPublicationTests method setUp.

@BeforeEach
public void setUp() throws Exception {
    XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(this.beanFactory);
    reader.setEventListener(this.eventListener);
    reader.setSourceExtractor(new PassThroughSourceExtractor());
    reader.loadBeanDefinitions(new ClassPathResource("beanEvents.xml", getClass()));
}
Also used : PassThroughSourceExtractor(org.springframework.beans.factory.parsing.PassThroughSourceExtractor) ClassPathResource(org.springframework.core.io.ClassPathResource) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with PassThroughSourceExtractor

use of org.springframework.beans.factory.parsing.PassThroughSourceExtractor in project spring-framework by spring-projects.

the class AspectJNamespaceHandlerTests method setUp.

@BeforeEach
public void setUp() throws Exception {
    SourceExtractor sourceExtractor = new PassThroughSourceExtractor();
    XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(this.registry);
    XmlReaderContext readerContext = new XmlReaderContext(null, null, this.readerEventListener, sourceExtractor, reader, null);
    this.parserContext = new ParserContext(readerContext, null);
}
Also used : PassThroughSourceExtractor(org.springframework.beans.factory.parsing.PassThroughSourceExtractor) XmlBeanDefinitionReader(org.springframework.beans.factory.xml.XmlBeanDefinitionReader) XmlReaderContext(org.springframework.beans.factory.xml.XmlReaderContext) ParserContext(org.springframework.beans.factory.xml.ParserContext) SourceExtractor(org.springframework.beans.factory.parsing.SourceExtractor) PassThroughSourceExtractor(org.springframework.beans.factory.parsing.PassThroughSourceExtractor) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

BeforeEach (org.junit.jupiter.api.BeforeEach)2 PassThroughSourceExtractor (org.springframework.beans.factory.parsing.PassThroughSourceExtractor)2 SourceExtractor (org.springframework.beans.factory.parsing.SourceExtractor)1 ParserContext (org.springframework.beans.factory.xml.ParserContext)1 XmlBeanDefinitionReader (org.springframework.beans.factory.xml.XmlBeanDefinitionReader)1 XmlReaderContext (org.springframework.beans.factory.xml.XmlReaderContext)1 ClassPathResource (org.springframework.core.io.ClassPathResource)1