I create a file pdf from html template using Spring Boot, flying saucer, thymeleaf. But image is not displaying in my file.
Project structure:
Try using Spring's classpath: prefix. This loads your file directly from the classpath, no matter if you are running from a .jar or within your IDE. Here is an example:
classpath:
.jar
More information about classpath: can be found in the official documentation.