Issue
after using minio as instructions and fixing it with ways below, I failed.what can i do to solve this bug
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio</artifactId>
<version>8.3.5</version>
<exclusions>
<exclusion>
<artifactId>okhttp</artifactId>
<groupId>com.squareup.okhttp3</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.9.3</version>
</dependency>
</dependencies>
Solution
I also experienced this issues with io.minio:minio:8.3.6
, but was able to force a newer version of okhttp
, which works with the MinIO client library. Here is the snippet of build.gradle
(should work similar with Maven):
implementation("io.minio:minio:8.3.6")
implementation("com.squareup.okhttp3:okhttp:4.9.3")
In my case it was probably caused by spring-boot-dependencies
coming with the spring dependency plugin, which manages a lot of dependencies containing also okhttp
and thus forces the downgrade.
See also:
- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/2.6.3
- https://github.com/minio/minio-java/issues/1298
Answered By - sdm4n
Answer Checked By - David Marino (JavaFixing Volunteer)