读书人

用Spring种读XML等文件

发布时间: 2012-08-09 15:59:21 作者: rapoo

用Spring类读XML等文件

String filePath="test.txt"org.springframework.core.io.Resource resource = new ClassPathResource(filePath);File  file=resource.getFile();

filePath放在类路径下。也就是工程的src文件夹下面。编译后会到WEB-INF下面的classes文件夹下面。

读书人网 >XML SOAP

热点推荐