目录结构
类路径下 static/home.html
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8"/>
<title>home</title>
<link rel="icon" th:href="@{/favicon.ico}" type="image/x-icon"/>
<link rel="bookmark" th:href="@{/favicon.ico}" type="image/x-icon"/>
或者
<link rel="icon" th:href="@{/static/favicon.ico}" type="image/x-icon"/>
<link rel="bookmark" th:href="@{/static/favicon.ico}" type="image/x-icon"/>
</head>
<body>
<p>static home.html页面</p>
</body>
</html>
模板下 templates/index.html
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8"/>
<title>index</title>
<link rel="icon" th:href="@{/favicon.ico}" type="image/x-icon"/>
<link rel="bookmark" th:href="@{/favicon.ico}" type="image/x-icon"/>
</head>
<body>
<p>index .html页面</p>
</body>
</html>