Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement