【MinIO】SpringBoot引入MinIO依赖遇到的一些问题:okhttp、kotlib-stdlib

centos上docker安装MinIO参考:https://blog.csdn.net/u014698745/article/details/122025423

参考官方文档SDK:https://docs.min.io/docs/java-client-quickstart-guide.html

MinIO Java SDK is Simple Storage Service (aka S3) client to perform bucket and object operations to any Amazon S3 compatible object storage service.

MinIO依赖jar包下载地址:Central Repository: io/minio/minio

JDK最低要求:Java 1.8 或更高版本。

【异常1】maven仓库MinIO 8.3.4下载很慢

解决办法:maven设置依赖下载地址


    
        public
        aliyun nexus
        http://maven.aliyun.com/nexus/content/groups/public/
        
            true
        
    



    
        public
        aliyun nexus
        http://maven.aliyun.com/nexus/content/groups/public/
        
            true
        
        
            false
        
    

【异常2】Caused by: java.lang.RuntimeException: Unsupported OkHttp library found. Must use okhttp >= 4.8

解决办法:maven引入minio排除okhttp依赖并添加高版本的okhttp依赖,如okhttp 4.9.0



    io.minio
    minio
    8.3.4
    
        
            com.squareup.okhttp3
            okhttp
        
    



    com.squareup.okhttp3
    okhttp
    4.9.0

【异常3】NoSuchMethodError kotlin.collections.ArraysKt.copyInto([B[BIII)[B

解决办法:指定kotlib-stdlib的版本



    org.jetbrains.kotlin
    kotlin-stdlib
    1.3.70

你可能感兴趣的:(对象存储OSS,Java,MinIO,Spring,Boot,MinIO,okhttp,kotlin-stdlib)