Estou tentando criar um Layout com Thymeleaf e Fragments mas ainda não consegui fazer funcionar. Eu consigo substituir o Header e o Footer usando th:replace mas o content ainda não consegui fazer a substituição com layout:fragment="content"
Como resolver isso ?
Layout.html
<!-- the main layout -->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head>
<title>Vendas</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script src="common-script.js"></script>
</head>
<body>
<div th:replace="home/header :: header"> This header content is going to be replaced.</div>
<!-- Main content -->
<section layout:fragment="content">
<p>Aqui vai o content das paginas</p>
</section>
<footer th:replace="home/footer :: footer" class="footer">
This content will remain, but other content will be inserted after it.
</footer>
</body>
</html>
CadastroCliente.html (content)
<!-- customer -->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout.html}">
<head>
<title>Cadastro de Cliente</title>
<script src="content-script.js"></script>
</head>
<body>
<section layout:fragment="content">
<p>Este é o cadastro de cliente</p>
</section>
</body>
</html>
Todas as minhas paginas que compõe o Layout (header.html, footer.html, e CadastroCliente.html) estão na pasta home para testes. Header e Footer são substituidos, mas o CadastroCliente com o content ainda não consegui.