springboot mybaits集成分页组件

来源:互联网 发布:金华管家婆软件jhgjp 编辑:程序博客网 时间:2024/06/08 11:53

1.添加关联jar包

        <!--分页组件-->        <dependency>            <groupId>org.mybatis.spring.boot</groupId>            <artifactId>mybatis-spring-boot-starter</artifactId>            <version>1.3.1</version>        </dependency>        <!--mybatis-->        <dependency>            <groupId>com.github.pagehelper</groupId>            <artifactId>pagehelper-spring-boot-starter</artifactId>            <version>1.1.1</version>        </dependency>

2.在application.yml中添加设置

mybatis:     mapperLocations: classpath:mapper/*.xml#分页配置pagehelper:    helperDialect: mysql    reasonable: true    supportMethodsArguments: true    params: count=countSql
原创粉丝点击