From de180197db47fc8261fa5f95bfa535b1dab65e03 Mon Sep 17 00:00:00 2001 From: mazhicheng Date: Mon, 16 Mar 2020 17:26:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0file=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- diboot-docs/guide/diboot-file/开始使用.md | 9 +++++++++ diboot-file-starter/pom.xml | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/diboot-docs/guide/diboot-file/开始使用.md b/diboot-docs/guide/diboot-file/开始使用.md index 7de9202..bd55dce 100644 --- a/diboot-docs/guide/diboot-file/开始使用.md +++ b/diboot-docs/guide/diboot-file/开始使用.md @@ -13,6 +13,14 @@ compile("com.diboot:diboot-file-spring-boot-starter:2.0.5") 2.0.5 ~~~ + +diboot-file会自动依赖以下jar包,无需重复引入: +* commons-fileupload: 1.4 +* easyexcel:2.1.x +* okhttp:4.3.x +* thumbnailator: 0.4.9 (图片压缩,不需要可剔除) +* easy-captcha: 1.6.x (验证码,不需要可剔除) + > file组件依赖一张表 upload_file ,用于存储文件/附件上传记录。该表将由diboot-file-starter初次加载时自动初始化。 > 如果使用diboot-devtools,还需要引入devtools相关依赖,可自动生成相关的上传下载controller。 @@ -122,6 +130,7 @@ HttpHelper.downloadLocalFile(String localFilePath, String exportFileName, HttpSe HttpHelper.downloadHttpFile(String fileUrl, String targetFilePath) // 图片保存,压缩,加水印等 (需依赖Thumbnails组件) + ImageHelper.saveImage(MultipartFile file, String imgName) ImageHelper.generateThumbnail(String sourcePath, String targetPath, int width, int height) ImageHelper.addWatermark(String filePath, String watermark) diff --git a/diboot-file-starter/pom.xml b/diboot-file-starter/pom.xml index c7d1bcf..4ae6354 100644 --- a/diboot-file-starter/pom.xml +++ b/diboot-file-starter/pom.xml @@ -52,6 +52,12 @@ thumbnailator 0.4.9 + + + com.github.whvcse + easy-captcha + 1.6.2 +