springboot +gradle 配置jpa启动报Error processing condition on org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration.pageableCustomizer

经过一步步查看删选是因为spring-data-jpa包的版本冲突导致。

解决方案:

修改gradle的build.gradle配置文件

a.添加plugin("org.springframework.boot")

b.修改引入方式 compile("org.springframework.boot:spring-boot-starter-data-jpa")

c.新引入 compile 'org.springframework.boot:spring-boot-autoconfigure:1.5.7.RELEASE'

build.gradle完整配置为:

group 'com.360.keplerDevMananger'
version '1.0-SNAPSHOT'

apply plugin: 'java'
apply plugin: 'idea'
plugin("org.springframework.boot")
apply plugin: 'war'

buildscript {

ext {
springBootVersion = "1.5.2.RELEASE"
}

repositories {
maven { url "https://repo.spring.io/libs-release" }
mavenLocal()
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.0.RELEASE")
}
}

repositories {
mavenCentral()
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
compile 'jstl:jstl:1.2'
compile 'com.alibaba:fastjson:1.2.21'
compile 'com.squareup.okhttp3:okhttp:3.9.1'
compile 'commons-io:commons-io:2.5'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'org.apache.ant:ant:1.8.2'
compile 'org.apache.tomcat.embed:tomcat-embed-jasper:8.5.30'
compile 'javax.servlet:javax.servlet-api:3.1.0'
compile 'javax.servlet:jstl:1.2'
runtime 'mysql:mysql-connector-java:5.1.45'
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile 'org.springframework.boot:spring-boot-starter-thymeleaf:1.5.2.RELEASE'
compile 'org.springframework.boot:spring-boot-starter-parent:1.5.2.RELEASE'
compile 'org.springframework.boot:spring-boot-starter-test:1.5.2.RELEASE'

compile("org.springframework.boot:spring-boot-starter-web") {
exclude module: "spring-boot-starter-tomcat"
}

testCompile('org.springframework.boot:spring-boot-starter-test:2.0.0.RELEASE')
compile files('libs/MQSDK.jar')//引入自定义包
testCompile group: 'junit', name: 'junit', version: '4.11'

}

springboot 配置jpa启动报Error processing condition on org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration.pageableCustomizer的更多相关文章

  1. springboot多数据源启动报错:required a single bean, but 6 were found:

    技术群: 816227112 参考:https://stackoverflow.com/questions/43455869/could-not-autowire-there-is-more-than ...

  2. SpringBoot整合Elasticsearch启动报错处理 nested exception is java.lang.IllegalStateException: availableProcessors is already set to [8], rejecting [8]

    Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean wit ...

  3. springboot 启动报错"No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available"

    1.问题 springboot启动报错 "D:\Program Files\Java\jdk-11\bin\java.exe" -XX:TieredStopAtLevel=1 -n ...

  4. 解决软件启动报error while loading shared libraries: libgd.so.2: cannot open shared object错误

    解决软件启动报error while loading shared libraries: libgd.so.2: cannot open shared object错误 今天安装启动nginx的时候报 ...

  5. springboot放到linux启动报错:The temporary upload location [/tmp/tomcat.8524616412347407692.8111/work/Tomcat/localhost/ROOT/asset] is not valid

    1.背景 笔者的springboot在一个非root用户环境下运行,这种环境下可以保证不被潜在的jar/开源框架漏洞提权. 比如在防火墙上把外网访问来的443端口映射到本地8443的java web端 ...

  6. Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method fail

    SpringBoot 单元测试报错 @RunWith(SpringRunner.class) @SpringBootTest public class ProductCategoryRepositor ...

  7. maven web 项目中启动报错 Java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

    主要原因是maven项目里面的jar包吗,没有导入到项目中 maven web 项目中启动报错 Java.lang.ClassNotFoundException: org.springframewor ...

  8. SpringBoot从1.5.1→2.2.4项目加包扫雷二:打不到符号java: org.springframework.boot.autoconfigure.web.相关配置错误支持包

    import org.springframework.boot.autoconfigure.web.DefaultErrorAttributes→org.springframework.boot.we ...

  9. 关于Springboot打包错误的问题 | Failed to execute goal org.springframework.boot:spring-boot-maven-plugin

    最近在使用spring-boot整合多模块,但是在父pom中打包maven install时总会报错:Failed to execute goal org.springframework.boot:s ...

随机推荐

  1. Java计算两个经纬度间的距离最简单的方式

    开发中经常会遇到计算两个点(经纬度)之间的距离或者计算最近门店的场景,下面简单实现一下如何计算两个经纬度之间相隔的距离. 1.导入geodesy的maven依赖 或者到阿里云maven仓库下载jar包 ...

  2. Linux学习6-Linux常用命令(2)

    目录处理命令     命令名称:mkdir 命令英文原意:make directories 命令所在路径:/bin/mkdir 执行权限:所有用户 功能描述:创建新目录 语法:mkdir -p[目录名 ...

  3. 关于Dubbo异常之Data length too large

    最近几日发现生产环境项目打出的日志,每天都在30~50G以上,寻找多次发现问题: 首先查看日志只看到大批量的json数据输出,这是方法查询后的返回值输出,期初以为是自己打了logger,结果寻找多次, ...

  4. 让iframe可编辑

    function EnableEdit() { var editor; editor = document.getElementById("HtmlEdit").contentWi ...

  5. 洛谷P3120 [USACO15FEB]牛跳房子(动态开节点线段树)

    题意 题目链接 Sol \(f[i][j]\)表示前\(i\)行\(j\)列的贡献,转移的时候枚举从哪里转移而来,复杂度\(O(n^4)\) 然后考虑每一行的贡献,动态开节点线段树维护一下每种颜色的答 ...

  6. js返回一组日期中最近连续的天数

    用js获取一组日期(并把当天算入)中连续的天数 刚开始可能想到单纯的比较日期大小判断连续, 而又有大小月,平闰年这些因素,还是时间戳来的安全; 首先得有一组日期,比如: var arr = [ '20 ...

  7. Chrome浏览器取消INPUT自动记忆下拉框

    项目中有一个搜索框,每次聚焦就会出现如下图自动记忆框,遮挡了项目的搜索列表 差了很多资料想要去掉它,最后发现在input上加上autocomplete="off"就可以了!

  8. html基础-a标签-img标签-绝对/相对路径(3)

    美好的星期六,今天多写一点,争取早点写js这个有点小无聊. 一.先来讲点网页之间的跳转 (1).<a href=""></a>  href="这里 ...

  9. 【java错误】错误: 编码GBK的不可映射字符

    java源代码 今天在写java是出现一个编码错误,这里先将书上的java源代码贴出来. import java.io.Console; public class ConsoleTest { //用j ...

  10. 基于OpenMP的C++并行编程简单示例

    示例要求:在整数A和B之间找到符合条件的值X,使f(X)=C. 示例代码(需要在VS中开启OpenMP支持): #include<iostream> #include<time.h& ...