官方处理
Access a File from the Classpath in a Spring Application
利用ClassPathResource
File file = new ClassPathResource("/dir/test.txt").getFile();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new ClassPathResource("/dir/test.txt").getInputStream()));
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)