Skip to content

Instantly share code, notes, and snippets.

@josescalia
Created July 21, 2013 07:37
Show Gist options
  • Save josescalia/6047842 to your computer and use it in GitHub Desktop.
Save josescalia/6047842 to your computer and use it in GitHub Desktop.
HelloWorldClient to fetch HelloWorld Spring remot
package org.josescalia.springremote.client;
import org.josescalia.springremote.service.HelloWorldService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* Created with IntelliJ IDEA.
* User: Josescalia
* Date: 7/20/13
* Time: 8:36 PM
* To change this template use File | Settings | File Templates.
*/
public class HelloWorldClient {
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("spring-client.xml");
HelloWorldService service = (HelloWorldService) context.getBean("helloWorldService");
String fromServer = service.helloWorld("MOJO");
System.out.println("Text From Server : " + fromServer);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment