Spring Boot 实现将多个MinIO文件压缩成压缩包并下载至本地

1 Maven依赖

		<dependency>
			<groupId>cn.hutool</groupId>
			<artifactId>hutool-all</artifactId>
			<version>5.5.7</version>
		</dependency>
		<dependency>
			<groupId>io.minio</groupId>
			<artifactId>minio</artifactId>
			<version>7.0.2</version>
		</dependency>

2 调试代码

   /**
     * 从MinIO下载多个文件
     *
     * @param response
     */
    @GetMapping("/downloadMultiFileToMinIO")
    public void downloadMultiFileToMinIO(HttpServletResponse response) throws IOException {
        MinioClient minioClient = minIOService.getMinioClient();
        List<String> fileUrlList = new ArrayList<>(Arrays.asList("新建文件夹1.txt","新建文本文档.txt", "myfile_20210515111437.docx"));
        //被压缩文件InputStream
        InputStream[] srcFiles = new InputStream[fi
评论 32
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值