Package org.springframework.context.support

Examples of org.springframework.context.support.GenericXmlApplicationContext


        };
    }
   
    private Thesaurus createThesaurus(File directory, String string) throws Exception {
        File thesaurusBlahFile = new  File(directory, string+".rdf");
        GenericXmlApplicationContext appContext = new GenericXmlApplicationContext();
        appContext.getBeanFactory().registerSingleton("IsoLangMapper", isoLangMapper);

        Thesaurus thes = new Thesaurus(appContext, string+".rdf", Geonet.CodeList.EXTERNAL, string, thesaurusBlahFile, "http://"+string+".com");
        setRepository(thes);
        if(!thesaurusBlahFile.exists() || thesaurusBlahFile.length() == 0) {
            populateThesaurus(thes, smallWords, "http://"+string+".com#", string+"Val", string+"Note", languages);
View Full Code Here


  @SuppressWarnings("unchecked")
  private Map<String, DataExporter> getModuleExportersFromXML(byte[] configurationXML) {
    ApplicationContext moduleContext = null;
        if (configurationXML != null) {
           try {
             moduleContext = new GenericXmlApplicationContext( new ByteArrayResource( configurationXML ) );
             } catch (BeansException be) {
                 throw new RuntimeException("Unable to load Tatool file.", be);
             }
            
             // see whether we have exporters
View Full Code Here

            for (Resource resource : entityContexts) {
                temp.add(resource);
            }
        }
        entityContexts = temp.toArray(new Resource[temp.size()]);
        applicationcontext = new GenericXmlApplicationContext(entityContexts);
    }
View Full Code Here

*/
public class ReproTests {

  @Test
  public void repro() {
    GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
    ctx.load("classpath:org/springframework/issues/ReproTests-context.xml");
    ctx.refresh();

    Foo foo = ctx.getBean(Foo.class);
    Bar bar = ctx.getBean(Bar.class);

    assertThat(foo.getBar(), sameInstance(bar));
  }
View Full Code Here

*/
public class ReproTests {

  @Test
  public void repro() {
    GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
    ctx.load("classpath:org/springframework/issues/ReproTests-context.xml");
    ctx.refresh();
  }
View Full Code Here

public class ReproTests {

  @Test
  public void repro() {
    System.out.println(System.getProperty("java.version"));
    GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
    ctx.load("classpath:org/springframework/issues/ReproTests-context.xml");
    ctx.refresh();

    Foo foo = ctx.getBean(Foo.class);

    assertThat(foo.getBar(), CoreMatchers.notNullValue());
  }
View Full Code Here

*/
public class ReproTests {

  @Test
  public void repro() {
    GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
    ctx.load("classpath:org/springframework/issues/ReproTests-context.xml");
    ctx.refresh();
    assertNotNull(ctx.getBean(ExampleBean.class).getInjectedDate());
  }
View Full Code Here

*/
public class ReproTests {

  @Test
  public void control() {
    GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
    ctx.load("classpath:org/springframework/issues/control.xml");
    ctx.refresh();
  }
View Full Code Here

    ctx.refresh();
  }

  @Test
  public void repro() {
    GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
    ctx.load("classpath:org/springframework/issues/repro.xml");
    ctx.refresh();
  }
View Full Code Here

*/
public class ReproTests {

  @Test
  public void repro() {
    GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
    ctx.load("classpath:org/springframework/issues/ReproTests-context.xml");
    ctx.refresh();

        BookService bookService = ctx.getBean(BookService.class);

        Book book = bookService.getBook(1);

        assertThat(book, nullValue()); //book not found, null cached

View Full Code Here

TOP

Related Classes of org.springframework.context.support.GenericXmlApplicationContext

Copyright © 2018 www.massapicom. 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.