Spring Boot/Gradle/Querydsl project has the same dependency dependent on different versions of another dependency

断了今生、忘了曾经 提交于 2019-12-06 16:18:43

The version 18.0 of Guava comes from querydsl and the 20.0 comes from spring-fox swagger.

spring-fox library expected that method of guava version 20.0 to be called. but called from 18.0. (because there are two guava library that has difference version in classpath)

you can use the following code to avoid conflict version of guava.

// QueryDsl
implementation("com.querydsl:querydsl-jpa:${querydslVersion}")
annotationProcessor("org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final")
annotationProcessor("com.querydsl:querydsl-apt:${querydslVersion}:jpa") {
    exclude group: "come.google.guava"
}
annotationProcessor("com.google.guava:guava:20.0")
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!