碎片原理:
head.html页面要进行碎片化处理(th:fragment="fragment1" fragment1为index.html页面引用)
<div th:fragment="fragment1">
<span style="background: aqua"> this is header!</span>
</div>
index.html( th:include="head::fragment1"中的head为head.html的前缀,必须保持一致。)
<div id="header" th:include="head::fragment1"></div>
include引用碎片标签中的内容,replace为替换当前的碎片标签。