@Before 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); }
@Before 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())); }
@Override protected 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())); }
@Override protected void initBeanDefinitionReader(XmlBeanDefinitionReader beanDefinitionReader) { this.registeredComponents = new HashSet<ComponentDefinition>(); beanDefinitionReader.setEventListener(new StoringReaderEventListener(this.registeredComponents)); beanDefinitionReader.setSourceExtractor(new PassThroughSourceExtractor()); }
/** * Set the {@link SourceExtractor} to use for generated bean definitions * that correspond to {@link Bean} factory methods. */ public void setSourceExtractor(SourceExtractor sourceExtractor) { this.sourceExtractor = (sourceExtractor != null ? sourceExtractor : new PassThroughSourceExtractor()); }