I have tried different apporaches. For me, most logical would be the standard way, as I have it now in my "Item.html":
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<title th:text="${item.name}"></title>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
This is the form what "drag and drop" in netbeans gives me as a path.
My file structure is shown here:
Any ideas?
static
in your src/main/resources/
folder.css
in created static
folder to store css files.css
files to the css
folder.css
like <link rel="stylesheet" type="text/css" th:href="@{/css/style.css}"/>
Here the static
folder to serve static contents like css
, js
files.