美文网首页
Spring Boot 集成 MyBatis, 分页插件 Pag

Spring Boot 集成 MyBatis, 分页插件 Pag

作者: 回不去的那些时光 | 来源:发表于2018-01-17 23:50 被阅读21次

    项目依赖

    <!--mybatis-->
    <dependency>  
     <groupId>org.mybatis.spring.boot</groupId>
     <artifactId>mybatis-spring-boot-starter</artifactId>
     <version>1.3.1</version>
     </dependency>
     <!--mapper-->
     <dependency>
      <groupId>tk.mybatis</groupId>
      <artifactId>mapper-spring-boot-starter</artifactId>
      <version>1.1.4</version>
      </dependency>
      <!--pagehelper-->
       <dependency>
       <groupId>com.github.pagehelper</groupId>
       <artifactId>pagehelper-spring-boot-starter</artifactId>
       <version>1.2.1</version>
     </dependency>
    

    application.yml 配置

     mybatis:
      mapper-locations: classpath:mapping/*.xml
      type-aliases-package: com.angus.entity
     pagehelper:
      helperDialect: mysql
      reasonable: true
      supportMethodsArguments: true
      params: count=countSql

    相关文章

      网友评论

          本文标题:Spring Boot 集成 MyBatis, 分页插件 Pag

          本文链接:https://www.haomeiwen.com/subject/fcspoxtx.html