新增读取资源流

This commit is contained in:
wenc000 2020-06-16 22:11:44 +08:00
parent 7847d8eded
commit d8c54d81db

View File

@ -26,6 +26,18 @@ public class ResourceUtil {
return resourceLoader.getResource(resourcePath).getInputStream();
}
/**
* 资源文件
*
* @param resourcePath
* @return
* @throws IOException
*/
public static File getResourceFile(String resourcePath) throws IOException {
ResourceLoader resourceLoader = new DefaultResourceLoader();
return resourceLoader.getResource(resourcePath).getFile();
}
/**
* 输入流输出文本
*