1.ApplicationContext actx=new FileSystemApplicationContext("config.xml");
Resource resource=actx.getResource("classpath:messages.properties");
2.
ApplicationContext actx=new FileSystemApplicationContext("config.xml");
Resource resource=actx.getResource("file:d:/eclipse");
3.
ApplicationContext actx=new FileSystemApplicationContext("config.xml");
Resource resource=actx.getResource("WEB-INF/src/messages.properties");
Resource的获取方式为策略模式: