Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Caused by: java.io.FileNotFoundException: class path resource
- [src/main/resources/Beans/beans.xml] cannot be opened because it does not
- exist
- package com.learntoprogram;
- import org.springframework.context.ApplicationContext;
- import org.springframework.context.support.ClassPathXmlApplicationContext;
- public class App {
- public static void main(String[] args) {
- ApplicationContext context = new
- ClassPathXmlApplicationContext("src/main/resources/Beans/beans.xml");
- Logger logger = (Logger)context.getBean("logger");
- logger.writeConsole("Hello There");
- logger.writeFile("Hi again");
- (((ClassPathXmlApplicationContext)context)).close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement