Package org.springframework.context

Examples of org.springframework.context.ApplicationContext


  }

  public void testNoAutowire() {
    StopWatch watch = new StopWatch();
    watch.start();
    ApplicationContext factory = new ClassPathXmlApplicationContext("/context-auto.xml");
    String name = SomeAction.class.getName();
    for (int i = 0; i < 100; i++) {
      factory.getBean(name);
    }
    System.out.println("no autowire using " + watch.getTime());
  }
View Full Code Here


    System.setProperty("rp.root","red-adaptive-search/tmp");
   
    File myFile = new File(".");
    log.debug(myFile.getAbsolutePath());
   
    ApplicationContext context = new FileSystemXmlApplicationContext(
        "red-adaptive-search/war/WEB-INF/simple/appContext.xml");

    // get the knowledgemanager
    knowledgeManager = (KnowledgeSphereManager) context
        .getBean(Config.KNOWLEDGEMANAGER_PLUGINNAME);

  }
View Full Code Here

        new DependencyCheckPostProcessor.Version("1.2.3")));
  }

  @Test
  public void testNormalGood() throws Exception {
    ApplicationContext ac = loadApplicationContext("/org/geomajas/spring/dependencyTestNormalGood.xml");
    TestRecorder recorder = ac.getBean(TestRecorder.class);
    Assert.assertEquals("", recorder.matches(DependencyCheckPostProcessor.GROUP,
        DependencyCheckPostProcessor.VALUE));
  }
View Full Code Here

    }
  }

  @Test
  public void testChecksInIdeBD() throws Exception {
    ApplicationContext ac = loadApplicationContext("/org/geomajas/spring/dependencyTestInIdeBackendDef.xml");
    TestRecorder recorder = ac.getBean(TestRecorder.class);
    Assert.assertEquals("", recorder.matches(DependencyCheckPostProcessor.GROUP,
        DependencyCheckPostProcessor.VALUE));
  }
View Full Code Here

        DependencyCheckPostProcessor.VALUE));
  }

  @Test
  public void testChecksInIdeBR() throws Exception {
    ApplicationContext ac = loadApplicationContext("/org/geomajas/spring/dependencyTestInIdeBackendRef.xml");
    TestRecorder recorder = ac.getBean(TestRecorder.class);
    Assert.assertEquals("", recorder.matches(DependencyCheckPostProcessor.GROUP,
        DependencyCheckPostProcessor.VALUE));
  }
View Full Code Here

        DependencyCheckPostProcessor.VALUE));
  }

  @Test
  public void testChecksInIdePD() throws Exception {
    ApplicationContext ac = loadApplicationContext("/org/geomajas/spring/dependencyTestInIdePluginDef.xml");
    TestRecorder recorder = ac.getBean(TestRecorder.class);
    Assert.assertEquals("", recorder.matches(DependencyCheckPostProcessor.GROUP,
        DependencyCheckPostProcessor.VALUE));
  }
View Full Code Here

        DependencyCheckPostProcessor.VALUE));
  }

  @Test
  public void testChecksInIdePR() throws Exception {
    ApplicationContext ac = loadApplicationContext("/org/geomajas/spring/dependencyTestInIdePluginRef.xml");
    TestRecorder recorder = ac.getBean(TestRecorder.class);
    Assert.assertEquals("", recorder.matches(DependencyCheckPostProcessor.GROUP,
        DependencyCheckPostProcessor.VALUE));
  }
View Full Code Here

        DependencyCheckPostProcessor.VALUE));
  }

  @Test
  public void testChecksDuplicatePluginGood() throws Exception {
    ApplicationContext ac = loadApplicationContext("/org/geomajas/spring/dependencyTestDuplicatePluginGood.xml");
    TestRecorder recorder = ac.getBean(TestRecorder.class);
    Assert.assertEquals("", recorder.matches(DependencyCheckPostProcessor.GROUP,
        DependencyCheckPostProcessor.VALUE));
  }
View Full Code Here

    }
  }

  @Test
  public void testChecksOptionalGood() throws Exception {
    ApplicationContext ac = loadApplicationContext("/org/geomajas/spring/dependencyTestOptionalGood.xml");
    TestRecorder recorder = ac.getBean(TestRecorder.class);
    Assert.assertEquals("", recorder.matches(DependencyCheckPostProcessor.GROUP,
        DependencyCheckPostProcessor.VALUE));
  }
View Full Code Here

        DependencyCheckPostProcessor.VALUE));
  }

  @Test
  public void testChecksOptionalMissing() throws Exception {
    ApplicationContext ac = loadApplicationContext("/org/geomajas/spring/dependencyTestOptionalMissing.xml");
    TestRecorder recorder = ac.getBean(TestRecorder.class);
    Assert.assertEquals("", recorder.matches(DependencyCheckPostProcessor.GROUP,
        DependencyCheckPostProcessor.VALUE));
  }
View Full Code Here

TOP

Related Classes of org.springframework.context.ApplicationContext

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.