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. 1Java开发环境

    1 下载      1.1 oracle官方网站 http://www.oracle.com/index.html      1.2 点击DOWNLOADS http://www.oracle.com ...

  2. 关于ajaxFileUpload只能上传一次的解决

    今天用ajaxFileUpload做了一个上传文件到服务器的功能. 出现问题:先上传了一次,后来发现读取完成以后,再上传的时候前台调试file和自动义参数都传进,但后台获取的仍然是上一次上传时的相关参 ...

  3. 关于Java中语句符号及格式的理解

    关于Java中语句符号及格式的理解 这篇文章是撰写的第一篇文章,在此作一下博主是一名在读的工科研究生,种种原因,研二开始决定转行从事程序员工作.开始的自学之路并不算非常顺畅,也走了一点弯路,但一直都坚 ...

  4. 手把手教你写一个java的orm(三)

    使用反射解析class 上一篇我们完成了class到表映射关系的建立,但是这个并不能被代码正确处理,我们还需要让程序能够正确的识别这些映射关系. 这一篇主要讲的是建立一个从class到表的模型,使我们 ...

  5. CodeForces765C

    C. Table Tennis Game 2 time limit per test:2 seconds memory limit per test:512 megabytes input:stand ...

  6. div模拟textarea文本域轻松实现高度自适应——张鑫旭

    by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=1362 一.关于tex ...

  7. python条件判断和循环

    条件判断 if <条件判断1>: <执行1> elif <条件判断2>: <执行2> elif <条件判断3>: <执行3> e ...

  8. ios 9 http

    记录: <key>NSAppTransportSecurity</key>     <dict>    <key>NSAllowsArbitraryLo ...

  9. elixir 基础数据结构

     Elixir中的一些基础的数据结构:整数,浮点数,字符串,原子,列表,元组  整数,浮点数,字符串 跟其他语言差不多  原子:名字为值的常量  在ruby类似Symbols  在erlang是用大写 ...

  10. java应用破解之破解 jeb mips 2.3.3

    前言 jeb 的新版支持 mips的反编译 ,于是去官网申请一个试用版,试用版的限制还是比较多的,比如 使用时间验证,没法复制粘贴 等,于是想尝试看看能否破解,同时填了 java破解 这个坑. 修改版 ...