toujoursseule

Untitled

Oct 18th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. package pe.edu.idat;
  2.  
  3. import org.springframework.context.support.AbstractApplicationContext;
  4. import org.springframework.context.support.ClassPathXmlApplicationContext;
  5.  
  6. public class MainApp {
  7.  
  8. public static void main(String[] args) {
  9. // TODO Auto-generated method stub
  10. AbstractApplicationContext context =
  11. new ClassPathXmlApplicationContext("Beans.xml");
  12.  
  13. HelloWorld obj = (HelloWorld)
  14. context.getBean("helloworld");
  15. System.out.println(obj.getMessage());
  16.  
  17. }
  18.  
  19. }
Add Comment
Please, Sign In to add comment