Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.example.tcpclient;
- import org.springframework.context.support.AbstractApplicationContext;
- import org.springframework.context.support.ClassPathXmlApplicationContext;
- public class ClientTcp {
- /**
- * @param args
- */
- public static void main(String[] args) {
- /* Spring Integration context used to get desirable beans. */
- AbstractApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"client-config.xml"}, false);
- context.refresh();
- context.registerShutdownHook();
- TcpClientService service = context.getBean("client", TcpClientService.class);
- service.send("GIMMY");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement