According to the Themeleaf documentation, it would be something like this :
<link rel="stylesheet" th:href="@{/static/css/main.css}">
Or you can also use the JSTL
c:url
tag if you are using JSP
:
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<link rel="stylesheet" href="<c:url value="/static/css/main.css" />">