Created
July 21, 2013 07:37
-
-
Save josescalia/6047842 to your computer and use it in GitHub Desktop.
HelloWorldClient to fetch HelloWorld Spring remot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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