The problem encountered by thymeleaf in doing a paging

The general idea of
  1. is to click on the previous page, the next page, to visit the URL, but when you click on the next page, the result of ${curpage+1} is always 11 instead of 2!

http://localhost:8080/bs/admin/users/?page=1

2.

            <div th:with="curpage=${-sharphttpServletRequest.getParameter("page")}">
                <a class="btn btn-sm btn-primary fpage"  th th:href="@{/admin/users/?page=}+(${curpage}==1?1:${curpage-1})"  ></a>
                <input  class="btn btn-sm btn-light "  th:value="${curpage}" id="page"  >
                <a class="btn btn-sm btn-primary apage"  th:href="@{/admin/users/?page=}+${curpage+1}"></a>
            </div>
Mar.23,2022

+ ${- sharpnumbers.formatDecimal (curpage) + 1} try this

Menu