image not displaying in PDF template using Spring Boot, flying saucer and Thymeleaf

后端 未结 4 1439
挽巷
挽巷 2021-01-13 23:21

I create a file pdf from html template using Spring Boot, flying saucer, thymeleaf. But image is not displaying in my file.

Project structure:

4条回答
  •  猫巷女王i
    2021-01-14 00:01

    Use standard html src atribute and relative path from root of the project.

    You can put your image in the root of the project and use it like this:

    
    

    If you want to resource folders you can set it like this:

    
    

提交回复
热议问题