青羊经侦大队-数据平台
src/main/java/com/example/jz/service/impl/MinIOServiceImpl.java
@@ -6,6 +6,7 @@
import com.example.jz.service.MinIOService;
import io.minio.MinioClient;
import io.minio.PutObjectOptions;
import jdk.internal.org.objectweb.asm.tree.FieldInsnNode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -27,11 +28,13 @@
    @Value("${minio.bucketName}")
    String bucketName;
    private static final String PATH = "http://221.237.182.28:19000/";
    @Override
    public String getPreviewFileUrl(String fileName) {
        try {
            return url + bucketName + '/' + fileName;
            return PATH + bucketName + '/' + fileName;
        } catch (Exception e) {
            throw new BusinessException("获取文件预览地址失败");
        }