ResourceUtils.getFile 找不到文件 Published on Oct 24, 2023 in 随笔 with 0 comment springboot 项目打成jar包使用ResourceUtils.getFile报错,文件找不到错误 可以使用: ```java ClassPathResource resource = new ClassPathResource("/templates/search/"); File sourceFile = resource.getFile(); String templateLoaderPath = sourceFile.getAbsolutePath(); ``` 本文由 admin 创作,采用 知识共享署名4.0 国际许可协议进行许可。本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名。