StringBoot + Thymeleaf + PageHelper + PageInfo 前端引入式分页

1. Thymeleaf 配置application.properties:

# thymeleaf 配置
spring.thymeleaf.servlet.content-type=text/html
spring.thymeleaf.cache=false
spring.thymeleaf.mode=html
spring.thymeleaf.prefix=classpath:/templates/view/

2. pagehelper+pageinfo使用:https://mp.csdn.net/postedit/100132595

3. 前端使用

      3.1) 抽离出一份单独的分页html

      

共 57 条

      3.2) 其他页面引用     


注:3.2 中th:substituteby 前半部分是抽离出的页面地址,pageInfo是后台传入的pageInfo对象;抽离出的页面th:fragment="pageInfo" 参数必须与入参一致 即后台传入的pageInfo;

 

 

你可能感兴趣的:(pagehelper,pageinfo,thymeleaf,Thymeleaf,pagehelper,pageinfo,springboot)