获取resource下文件

Resource resource = new ClassPathResource(certPath);
File file= resource.getFile();
原文地址:https://www.cnblogs.com/ZenoPan/p/10115963.html