Package org.springframework.context.support

Examples of org.springframework.context.support.GenericXmlApplicationContext.load()


  @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();
  }

  @Test
  public void repro() {
View Full Code Here

  }

  @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);
View Full Code Here

  }

  public String v1(String resourceLocation) {

    GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
    ctx.load(resourceLocation);
    ctx.refresh();

    try {
      return ctx.getBean(TestBean.class).getName();
    }
View Full Code Here

   * for a solution to this.
   */
  @Test
  public void repro() {
    GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
    ctx.load("ReproTests-repro.xml");
    ctx.refresh();
  }

  /**
   * Work around the lifecycle issues above by introducing a PropertySource containing
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);
View Full Code Here

    GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
    ctx.getEnvironment()
      .getPropertySources()
        .addFirst(new MapPropertySource("localProps", localProps));
    ctx.load("ReproTests-workaround.xml");
    ctx.refresh();
  }

}
View Full Code Here

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

    Foo foo = ctx.getBean(Foo.class);
    Bar bar = ctx.getBean(Bar.class);
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.