Package org.springframework.context.support

Examples of org.springframework.context.support.ClassPathXmlApplicationContext


*/
public class CafeDemoAppOperationsActiveMQ {


  public static void main(String[] args) throws InterruptedException, IOException {
    AbstractApplicationContext context = new ClassPathXmlApplicationContext(
        "/META-INF/spring/integration/activemq/cafeDemo-amq-config.xml",
        "/META-INF/spring/integration/activemq/cafeDemo-amq-operations.xml");

    System.out.println("Press Enter/Return to exit");
    System.in.read();
    context.close();
  }
View Full Code Here


@Ignore
public class StringConversionServiceTest {

  @Test
  public void testStartupOfSpringInegrationContext() throws Exception{
    new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml",
                          StringConversionServiceTest.class);
    Thread.sleep(2000);
  }
View Full Code Here

  }

  @Test
  public void testConvertStringToUpperCase() {
    final ApplicationContext context
      = new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml",
                          StringConversionServiceTest.class);

    final StringConversionService service = context.getBean(StringConversionService.class);

    final String stringToConvert = "I love Spring Integration";
    final String expectedResult  = "I LOVE SPRING INTEGRATION";

    final String convertedString = service.convertToUpperCase(stringToConvert);
View Full Code Here

      cafe.placeOrder(order);
    }
  }

  public static void main(String[] args) throws InterruptedException, IOException {
    AbstractApplicationContext context = new ClassPathXmlApplicationContext(
        "/META-INF/spring/integration/activemq/cafeDemo-amq-config.xml",
        "/META-INF/spring/integration/activemq/cafeDemo-amq-xml.xml");
    order(context, 25);
    context.close();
  }
View Full Code Here

      cafe.placeOrder(order);
    }
  }

  public static void main(String[] args) throws InterruptedException, IOException {
    AbstractApplicationContext context = new ClassPathXmlApplicationContext(
        "/META-INF/spring/integration/activemq/cafeDemo-amq-config.xml",
        "/META-INF/spring/integration/activemq/cafeDemo-amq-jms-backed.xml");

    // comment this out to run the sample without placing any new orders on the queue
    order(context, 25);

    System.in.read();
    context.close();
  }
View Full Code Here

        + "\n    http://www.springsource.org/spring-integration       "
        + NEWLINE
        + LINE );

    final AbstractApplicationContext context =
      new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/*-context.xml");

    context.registerShutdownHook();

    final Scanner scanner = new Scanner(System.in);

    final CoffeeService service = context.getBean(CoffeeService.class);

    LOGGER.info(LINE
        + NEWLINE
        + "\n    Please press 'q + Enter' to quit the application."
        + NEWLINE
View Full Code Here

*/
public class AXML {

  public static void main(String[] args) throws Exception {
    ConfigurableApplicationContext ctx =
        new ClassPathXmlApplicationContext("AXML-context.xml");
    System.out.println(ctx.getBean(FooService.class).foo("foo"));
    ctx.close();
  }
View Full Code Here

*/
public class BXMLAndPojo {

  public static void main(String[] args) throws Exception {
    ConfigurableApplicationContext ctx =
        new ClassPathXmlApplicationContext("BXMLAndPojo-context.xml");
    System.out.println(ctx.getBean(FooService.class).foo("foo"));
    ctx.close();
  }
View Full Code Here

public class SpringIntegrationTest {

  public static void main(String[] args) throws Exception {

    ConfigurableApplicationContext context =
        new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml", SpringIntegrationTest.class);
    System.out.println("Hit Enter to terminate");
    System.in.read();
    context.close();
  }
View Full Code Here

          + "\n    http://www.springsource.org/spring-integration       "
          + "\n                                                         "
          + "\n=========================================================" );

    final AbstractApplicationContext context =
        new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/*-context.xml");

    context.registerShutdownHook();

    final SearchRequestor searchRequestor = context.getBean(SearchRequestor.class);
    final SearchA searchA = context.getBean(SearchA.class);
    final SearchB searchB = context.getBean(SearchB.class);

    final Scanner scanner = new Scanner(System.in);

    System.out.println("Please enter a choice and press <enter>: ");
    System.out.println("\t1. Submit 2 search queries, 2 results returned.");
View Full Code Here

TOP

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

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.