Examples of loadBeanDefinitions()


Examples of net.sf.springofeclipse.BeansExtensionPointBeanDefinitionReader.loadBeanDefinitions()

    GenericApplicationContext context = new GenericApplicationContext();
    context.setId("testContext");

    BeansExtensionPointBeanDefinitionReader reader = new BeansExtensionPointBeanDefinitionReader(
        context);
    reader.loadBeanDefinitions(context.getId());

    TestBean bean = (TestBean) context.getBean("testBean", TestBean.class);

    assertNotNull(bean);
View Full Code Here

Examples of net.sf.springofeclipse.ImportExtensionPointBeanDefinitionReader.loadBeanDefinitions()

    GenericApplicationContext context = new GenericApplicationContext();
    context.setId("testContext");

    ImportExtensionPointBeanDefinitionReader reader = new ImportExtensionPointBeanDefinitionReader(
        context);
    reader.loadBeanDefinitions(context.getId());

    assertNotNull(context.getBean("testBean"));

    assertNotNull(context.getBean("testBean1"));
View Full Code Here

Examples of org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader.loadBeanDefinitions()

    for (String location : mergedConfig.getLocations()) {
      if (StringUtils.endsWithIgnoreCase(location, ".xml")) {
        xmlReader.loadBeanDefinitions(location);
      }
      else {
        groovyReader.loadBeanDefinitions(location);
      }
    }
  }

  /**
 
View Full Code Here

Examples of org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions()

        new XmlBeanDefinitionReader(beanFactory):
        new GroovyBeanDefinitionReader(beanFactory);

    reader.setResourceLoader(new PathMatchingResourcePatternResolver(classLoaderToUse));

    reader.loadBeanDefinitions(source);

    return defaultModuleOptionsMetadataCollector.collect(beanFactory);

  }
View Full Code Here

Examples of org.springframework.beans.factory.support.BeanDefinitionReader.loadBeanDefinitions()

            context.setClassLoader(classLoader);
            ResourceLoader resourceLoader = new DefaultResourceLoader(classLoader);
            context.setResourceLoader(resourceLoader);
            BeanDefinitionReader reader = new XmlBeanDefinitionReader(context);
            for (String resource : resources) {
                reader.loadBeanDefinitions(resourceLoader.getResource(resource));
            }
            context.refresh();
            return context;
        }
View Full Code Here

Examples of org.springframework.beans.factory.support.BeanDefinitionReader.loadBeanDefinitions()

  private DefaultListableBeanFactory beanFactory;

  protected void setUp() throws Exception {
    this.beanFactory = new DefaultListableBeanFactory();
    BeanDefinitionReader reader = new XmlBeanDefinitionReader(this.beanFactory);
    reader.loadBeanDefinitions(new ClassPathResource("collectionMerging.xml", getClass()));
  }

  public void testMergeList() throws Exception {
    TestBean bean = (TestBean) this.beanFactory.getBean("childWithList");
    List list = bean.getSomeList();
View Full Code Here

Examples of org.springframework.beans.factory.support.PropertiesBeanDefinitionReader.loadBeanDefinitions()

                config = getRestletContext().getClientDispatcher().handle(
                        new Request(Method.GET, ref)).getEntity();

                if (config != null) {
                    propReader = new PropertiesBeanDefinitionReader(this);
                    propReader.loadBeanDefinitions(new SpringResource(config));
                }
            }

            // Then, read the bean definitions from XML representations
            XmlBeanDefinitionReader xmlReader = null;
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions()

        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(this);
        reader.setParserClass(DEFAULT_PARSER_CLASS);
        reader.setEntityResolver(new CeltixBeansDtdResolver());
        reader.setValidating(false);
        reader.setNamespaceAware(true);
        reader.loadBeanDefinitions(res);
             
        editor = new JaxbPropertyEditor();
        registerCustomEditor(String.class, editor);
       
        PropertyEditor pe = null;
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions()

          String errorMessage = "Cannot look up Spring configuration " + configKey;
          log.error(errorMessage);
          throw new SynapseException(errorMessage);
        }

        xbdr.loadBeanDefinitions(
            new InputStreamResource(
                SynapseConfigUtils.getStreamSource(springConfig).getInputStream()));
        appContext.refresh();
        if (synLog.isTraceOrDebugEnabled()) {
            synLog.traceOrDebug("Spring ApplicationContext from key : " + configKey + " created");
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions()

    static GenericApplicationContext getContext() {
        log.info("Creating Spring Application Context ...");
        GenericApplicationContext ctx = new GenericApplicationContext();
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(ctx);
        reader.loadBeanDefinitions(new ClassPathResource("/applicationContext.xml"));

        ctx.refresh();
        return ctx;
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.