mybatis三剑客之mybatis-pagehelper分页插件

9mybatis三剑客之mybatis-pagehelper分页插件

9.1 文档地址:https://github.com/pagehelper/Mybatis-PageHelper

9.2 简介说明:这个插件会使编程简单,我们只需要填充数据就行,具体分页的逻辑多交给插件来做,mybatis-pagehelper劫持sql语句后,然后在执行select count计算 然后填充到分页节点字段中。

9.3 使用步骤:

在项目的pom.xml中配置mybatis-pagehelper的依赖

<!-- mybatis pager -->

<dependency>
  <groupId>com.github.pagehelper</groupId>
  <artifactId>pagehelper</artifactId>
  <version>4.1.0</version>
</dependency>

<dependency>
  <groupId>com.github.miemiedev</groupId>
  <artifactId>mybatis-paginator</artifactId>
  <version>1.2.17</version>
</dependency>

<dependency>
  <groupId>com.github.jsqlparser</groupId>
  <artifactId>jsqlparser</artifactId>
  <version>0.9.4</version>
</dependency>

10配置Spring

https://spring.io/projects/spring-framework

项目配置Spring,导入mmall线上三个已经配好的文件

详细配置见五个文件对应的注解

 

11logback配置

拷贝线上文件logback.xml文件,详情见注解

 

12ftp服务器配置 -mshop.properties

ftp.server.ip=你的FTP服务器ip地址
ftp.user=mmallftp
ftp.pass=ftppassword
ftp.server.http.prefix=http://img.happymmall.com/

13IDEA工具优化

a-实时编译,要配置problem工具:

Settings-Build.....-Compiler-勾上右边的make project automatically

IDEA自动实时编译配置:主要用于编程过程,写错代码可以立马看到错误,提高效率

b-自动注解优化:主要防止IDEA认为错误,但实际项目可以正常运行,主要原因是因为Spring-auto导致的

Settings-搜索inspections -找到Inspection- 找到Spring-Spring Core -Code- Autowiring for Bean class,值修改成warming

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值