//获取 inputStream 方式一
Resource resource = new ClassPathResource("excel/template/test.xlsx");
InputStream inputStream = resource.getInputStream();
//获取 inputStream 方式二
InputStream inputStream = TestController.class.getResourceAsStream("/excel/template/test.xlsx");