springboot 集成 minio 8.5.10 报错
***************************
APPLICATION FAILED TO START
***************************Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
io.minio.S3Base.<clinit>(S3Base.java:105)
The following method did not exist:
'okhttp3.RequestBody okhttp3.RequestBody.create(byte[], okhttp3.MediaType)'
The method's class, okhttp3.RequestBody, is available from the following locations:
jar:file:/Users/liudongyang/Desktop/download/maven-repository/repository/com/squareup/okhttp3/okhttp/3.14.9/okhttp-3.14.9.jar!/okhttp3/RequestBody.class
The class hierarchy was loaded from the following locations:
okhttp3.RequestBody: file:/Users/liudongyang/Desktop/download/maven-repository/repository/com/squareup/okhttp3/okhttp/3.14.9/okhttp-3.14.9.jar
Action:Correct the classpath of your application so that it contains a single, compatible version of okhttp3.RequestBody
Disconnected from the target VM, address: '127.0.0.1:51481', transport: 'socket'
Process finished with exit code 1
pom按照以下配置
<dependency> <groupId>io.minio</groupId> <artifactId>minio</artifactId> <version>8.5.10</version> </dependency> <dependency> <groupId>com.squareup.okhttp3</groupId> <artifactId>okhttp</artifactId> <version>4.9.1</version> </dependency>
原因:
大概率是包冲突,或者okhttp版本与minio不匹配