java - Can I reference a file from within a Spring Boot project? -
i writing spring boot program should populate xlsx template data , trying read template inside project. directory structure follows:
i trying access file using following code:
try { inputstream fis = this.getclass().getresourceasstream("xlstemplates/billingreview.xlsx"); xssfworkbook billingreviewtemplate = new xssfworkbook(fis); } catch (filenotfoundexception e) { e.printstacktrace(); }
unfortunately have yet find way read xlsx file inputstream. comes null. have pointers on how can reference file included in project?
Comments
Post a Comment