/**
* 以resource为根目录
* Example:get file static/tpl/tpl.xslx
* filePath = static/tpl/tpl.xslx
* @param filePath
* @return
* @throws Exception
*/
public static InputStream getResourceInputStream(String filePath) throws Exception {
ClassPathResource classPathResource = new ClassPathResource(filePath);
InputStream inputStream =classPathResource.getInputStream();
return inputStream;
}
版权归属:
BKUN
许可协议:
本文使用《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》协议授权
评论区