Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Caused by: java.io.FileNotFoundException: class path resource
  2. [src/main/resources/Beans/beans.xml] cannot be opened because it does not
  3. exist
  4.  
  5. package com.learntoprogram;
  6.  
  7. import org.springframework.context.ApplicationContext;
  8. import org.springframework.context.support.ClassPathXmlApplicationContext;
  9.  
  10. public class App {
  11.  
  12. public static void main(String[] args) {
  13.  
  14. ApplicationContext context = new
  15. ClassPathXmlApplicationContext("src/main/resources/Beans/beans.xml");
  16.  
  17. Logger logger = (Logger)context.getBean("logger");
  18.  
  19. logger.writeConsole("Hello There");
  20. logger.writeFile("Hi again");
  21.  
  22. (((ClassPathXmlApplicationContext)context)).close();
  23.  
  24. }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement