问题:
class path resource cannot be resolved to absolute file path becase it does not reside in the file system
springboot 打jar包放在服务器出现。
解决:
读取配置文件
ClassPathResource classPathResource = new ClassPathResource("文件路径");
InputStream inputStream = classPathResource.getInputStream();