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

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")

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‘

}

原文地址:https://www.cnblogs.com/jiangds/p/9003696.html

时间: 2024-10-08 10:17:03

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

java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration$ThymeleafDefaultConfiguration.templateEngine

2018-12-25 22:58:28.023 DEBUG 2204 --- [ restartedMain] c.c.c.a.CrawlerAutohomeApplication : Running with Spring Boot v2.1.1.RELEASE, Spring v5.1.3.RELEASE 2018-12-25 22:58:28.039 INFO 2204 --- [ restartedMain] c.c.c.a.CrawlerAutohomeApplication : No

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

技术群: 816227112 参考:https://stackoverflow.com/questions/43455869/could-not-autowire-there-is-more-than-one-bean-of-datasource-type Parameter 0 of method redisTemplate in org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration required

解决软件启动报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的时候报这个错误:error while loading shared libraries: libgd.so.2: cannot open shared object,网上查了相关资料,解决了,在此记录下,也让后面遇到这个问题的朋友能快速解决. 先说解决办法,帮助着急解决问题的朋友,这个是因为缺失gd库,

maven web 项目中启动报错java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener

本篇文章主要介绍了"maven web 项目中启动报错java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener ",主要涉及到maven web 项目中启动报错java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener 方面的内容,对于maven web 项目中启动报错jav

SpringBoot发布WAR启动报错:Error assembling WAR: webxml attribute is required

Spring Boot发布war包流程: 1.修改web model的pom.xml <packaging>war</packaging> SpringBoot默认发布的都是jar,因此要修改默认的打包方式jar为war 2.修改web model的依赖(dependency) <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boo

Hadoop启动报Error: JAVA_HOME is not set and could not be found解决办法

Hadoop安装完后,启动时报Error: JAVA_HOME is not set and could not be found.解决办法:        修改/etc/hadoop/hadoop-env.sh中设JAVA_HOME.        应当使用绝对路径.        export JAVA_HOME=$JAVA_HOME                  //错误,不能这么改        export JAVA_HOME=/usr/java/jdk1.6.0_45      

springmvc项目启动报错 nested exception is org.springframework.core.NestedIOException

学习springmvc的时候demo启动报错: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/Users/zhanglingxiang/IdeaProjects/springmvc_hellow/out/artifacts/springmvc_hellow_war_exploded/WEB-INF/classes/co

Tomcat8.5配置https启动报空指针错误

tomcat8.5版本和tomcat8.0有了很大的区别,默认的server.xml中https的配置方式也有了变化: <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true" secure="true" URIEncoding="UTF-8" useBodyEncodi

Tomcat启动报Error listenerStart错误

今天启动Tomcat启动不了,报以下错: org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/******] startup failed due to previous errors 网上找了N多文章,都没有切中要害. 后来在国外网站上搜