I have a thymeleaf html template with custom css styling and a 'flying saucer' to produce the pdf and download from the GET REST endpoint.
Here is the project folder structure of the project with template:
When I run the Application class and use the endpoint, the pdf downloaded has the css styling applied as expected. However, when it is packaged in a jar and run, pdf downloaded does not have the styling applied.
And here is how html template looks for styling.css
<head>
<meta charset="UTF-8"/>
<link th:href="@{src/main/resources/templates/styling.css}" rel="stylesheet" type="text/css"/>
Can anybody please tell me what's wrong when applicaion is packged in jar?