Spring Boot 2.x 使用PageHelper就是不分页

这个东西为啥没有一个简单的starter搞定
最后按照这个博客:spring boot 整合pagehelper 分页不生效
多加了一个依赖搞定
最后我的配置

buildscript {
    ext {
        springBootVersion = '2.1.1.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}
plugins {
    id 'org.jetbrains.kotlin.jvm' version '1.3.0'
}

apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

configurations {
    providedRuntime
}

dependencies {
//    implementation('org.springframework.boot:spring-boot-starter-data-redis')
    implementation('org.springframework.boot:spring-boot-starter-web')
    implementation('org.springframework.boot:spring-boot-starter-logging')
    implementation('org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.2')
    runtimeOnly('org.springframework.boot:spring-boot-devtools')
    runtimeOnly('mysql:mysql-connector-java')
    // https://mvnrepository.com/artifact/com.alibaba/druid
    compile group: 'com.alibaba', name: 'druid', version: '1.1.12'
    // https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper
    compile group: 'com.github.pagehelper', name: 'pagehelper', version: '5.1.8'
    // https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter
    compile group: 'org.mybatis.spring.boot', name: 'mybatis-spring-boot-starter', version: '1.3.2'
    // https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper-spring-boot-autoconfigure
    compile group: 'com.github.pagehelper', name: 'pagehelper-spring-boot-autoconfigure', version: '1.2.10'
    // https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper-spring-boot-starter
    compile group: 'com.github.pagehelper', name: 'pagehelper-spring-boot-starter', version: '1.2.10'


    providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
    testImplementation('org.springframework.boot:spring-boot-starter-test')
    compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
    compile "org.jetbrains.kotlin:kotlin-reflect"
}
compileKotlin {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}
compileTestKotlin {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}

你可能感兴趣的:(编程错误)