package helloworld;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Main {
public static void main(String[] args) {
ApplicationContext context =
new ClassPathXmlApplicationContext(new String[] {"services.xml"});
// retrieve configured instance
MyHelloWorld service = context.getBean("greeting", MyHelloWorld.class);
// use configured instance
System.out.println(service.getGreeting());
}
}