I'm creating a small web app, that will generate and generate a pdf file. The app is created with SpringBoot 2.5.4.
My first intent use this line to compile the jasper report
JasperReport compileReport = JasperCompileManager.compileReport(new FileInputStream("src/main/resources/Invoice.jrxml"));
Everything works fine within the IDE (STS 4.x), but when I "build" and run with java -jar, I get a FileNotFoundException.
Then I decided to compile the .jrxml and use .jasper file. And also I want to move my files to /resources/static/reports folder, to allow the package to include that files.
But again I'm stuck, I want to retrieve static files within SpringBoot app, and when I run it, no matter how... I could load and read that file.
What I'm doing wrong?
Best Regards