space admin edit.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<title>pagination fragment</title>
</head>
<body>
<div id="paginationFragment" th:fragment="paginationFragment" >
<div th:if="${page.totalPages>1}">
<a th:if="!${page.firstPage}" th:href="@{${baseUrl}(p.page=1)}"><<</a>
<a th:if="${page.hasPreviousPage()}" th:href="@{${baseUrl}(p.page=${page.number})}"><</a>
<span th:if="${page.number-2} > 0">...</span>
<a th:each="i: ${#numbers.sequence(1,2)}" th:if="${page.number-2+i} > 0" th:href="@{${baseUrl}(p.page=${page.number-2+i})}" th:text="${page.number-2+i}"></a>
<span th:text="${page.number+1}"></span>
<a th:each="i: ${#numbers.sequence(1,2)}" th:if="${page.number+1+i} < ${page.totalPages+1}" th:href="@{${baseUrl}(p.page=${page.number+1+i})}" th:text="${page.number+1+i}"></a>
<span th:if="${page.number+3} < ${page.totalPages}">...</span>
<a th:if="${page.hasNextPage()}" th:href="@{${baseUrl}(p.page=${page.number+2})}">></a>
<a th:if="!${page.lastPage}" th:href="@{${baseUrl}(p.page=${page.totalPages})}">>></a>
</div>
<div th:remove="all">
<a href="#?p.page=1"><<</a>
<a href="#?p.page=3"><</a>
<span>...</span>
<a href="#?p.page=2">3</a>
<a href="#?p.page=3">4</a>
<span>5</span>
<a href="#?p.page=5">6</a>
<a href="#?p.page=6">7</a>
<span>...</span>
<a href="#?p.page=5">></a>
<a href="#?p.page=7">>></a>
</div>
</div>
</body>
</html>