Spring Boot gets the file under java resources

‮w//:sptth‬ww.lautturi.com
Spring Boot gets the file under java resources
ClassPathResource resource = new ClassPathResource("template" + File.separator + "excelTemplate.xlsx");
// get the file stream
InputStream inputStream = resource.getInputStream();

// get the file
File file = resource.getFile();
Created Time:2017-09-06 07:23:55  Author:lautturi