I had a dependencies problem between Spring data jpa 2.7.2 and springdoc-openapi-ui 1.6.3, the conflicting dependency is:
<dependency>
<groupId>io.github.classgraph</groupId>
<artifactId>classgraph</artifactId>
</dependency>
I have never seen this artifact so im not sure what is the use they are giving to it (maybe they are using this to map important annotations like @Transactional?), in consequence Im not sure if the solution I am giving its not going to cause any trouble, anyways heres the details:
Spring data jpa uses the version 4.8.108 Springdoc uses version 4.8.117
The solution:
First, exclude the dependency on both artifacts:
Springdata:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<exclusions>
<exclusion>
<groupId>io.github.classgraph</groupId>
<artifactId>classgraph</artifactId>
</exclusion>
</exclusions>
</dependency>
Springdoc:
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.6.3</version>
<exclusions>
<exclusion>
<groupId>io.github.classgraph</groupId>
<artifactId>classgraph</artifactId>
</exclusion>
</exclusions>
</dependency>
Second and lastly, add the dependency (I chose this version cause another project that had this problem is using this one too):
<dependency>
<groupId>io.github.classgraph</groupId>
<artifactId>classgraph</artifactId>
<version>4.8.147</version>
</dependency>
So far no problems, but I hate not really knowing what is going on behind the scenes with this artifact (what use it has for spring data jpa? and as a plus maybe you could tell me the use for springdoc), and I just chose this version because I saw it was being used in another project with the same problem...
Lastly here is the most similar situation I could fine here at SO https://stackoverflow.com/a/72403827/12085680