List of usage examples for org.springframework.context.support ClassPathXmlApplicationContext ClassPathXmlApplicationContext
public ClassPathXmlApplicationContext(String... configLocations) throws BeansException
From source file:com.apress.prospringintegration.errorhandling.ErrorHandlingIntegration.java
public static void main(String[] args) { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "classpath:errorhandling/error-handling-integration.xml"); MessageChannel input = context.getBean("input", MessageChannel.class); input.send(MessageBuilder.withPayload("Sample Message").build()); }
From source file:com.dinstone.jrpc.NamespaceHandlerTest.java
public static void main(String[] args) { ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext( "application-context-sample.xml"); HelloService service = (HelloService) applicationContext.getBean("rhsv1"); try {//from w w w.ja va 2 s . c om testHot(service); } catch (Exception e) { e.printStackTrace(); } try { testSend1k(service); } catch (Exception e) { e.printStackTrace(); } try { System.in.read(); } catch (IOException e) { } applicationContext.close(); }
From source file:org.apache.cxf.transport.xmpp.iq.Server.java
public static void main(String[] args) throws Exception { new ClassPathXmlApplicationContext("server-iq-applicationContext.xml"); Thread.sleep(30 * 60 * 1000); }
From source file:org.apache.cxf.transport.xmpp.pep.Server.java
public static void main(String[] args) throws Exception { new ClassPathXmlApplicationContext("server-pep-applicationContext.xml"); Thread.sleep(30 * 60 * 1000); }
From source file:org.apache.cxf.transport.xmpp.chat.Server.java
public static void main(String[] args) throws Exception { new ClassPathXmlApplicationContext("server-chat-applicationContext.xml"); Thread.sleep(30 * 60 * 1000); }
From source file:com.tvd.common.gateway.HelloWorldExample.java
public static void main(String args[]) { String cfg = "gateway/context.xml"; @SuppressWarnings("resource") ApplicationContext context = new ClassPathXmlApplicationContext(cfg); HelloService helloService = (HelloService) context.getBean("helloGateway", HelloService.class); System.out.println(helloService.sayHello("World")); }
From source file:org.apache.cxf.transport.xmpp.pubsub.Server.java
public static void main(String[] args) throws Exception { new ClassPathXmlApplicationContext("server-pubsub-applicationContext.xml"); Thread.sleep(30 * 60 * 1000); }
From source file:com.tservice.Facade.Main.java
/** * @param args the command line arguments *///from w w w . ja va 2s .c om public static void main(String[] args) { // TODO code application logic here ApplicationContext ap = new ClassPathXmlApplicationContext("/applicationContext.xml"); PersistenceFacede l = (PersistenceFacede) ap.getBean(PersistenceFacede.class); }
From source file:com.apress.prospringintegration.ftp.SftpInbound.java
public static void main(String[] args) { ApplicationContext context = new ClassPathXmlApplicationContext("/spring/ftp/sftp-inbound-context.xml"); PollableChannel ftpChannel = context.getBean("ftpChannel", PollableChannel.class); Message<?> message = ftpChannel.receive(); System.out.println("message: " + message); }
From source file:com.apress.prospringintegration.ftp.FtpInbound.java
public static void main(String[] args) { ApplicationContext context = new ClassPathXmlApplicationContext("/spring/ftp/ftp-inbound-context.xml"); PollableChannel ftpChannel = context.getBean("ftpChannel", PollableChannel.class); Message<?> message = ftpChannel.receive(); System.out.println("message: " + message); }