更新file文档

This commit is contained in:
mazhicheng 2020-03-16 17:26:44 +08:00
parent a1aba78a5e
commit de180197db
2 changed files with 15 additions and 0 deletions

View File

@ -13,6 +13,14 @@ compile("com.diboot:diboot-file-spring-boot-starter:2.0.5")
<version>2.0.5</version> <version>2.0.5</version>
</dependency> </dependency>
~~~ ~~~
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初次加载时自动初始化。 > file组件依赖一张表 upload_file ,用于存储文件/附件上传记录。该表将由diboot-file-starter初次加载时自动初始化。
> 如果使用diboot-devtools还需要引入devtools相关依赖可自动生成相关的上传下载controller。 > 如果使用diboot-devtools还需要引入devtools相关依赖可自动生成相关的上传下载controller。
@ -122,6 +130,7 @@ HttpHelper.downloadLocalFile(String localFilePath, String exportFileName, HttpSe
HttpHelper.downloadHttpFile(String fileUrl, String targetFilePath) HttpHelper.downloadHttpFile(String fileUrl, String targetFilePath)
// 图片保存,压缩,加水印等 需依赖Thumbnails组件 // 图片保存,压缩,加水印等 需依赖Thumbnails组件
ImageHelper.saveImage(MultipartFile file, String imgName) ImageHelper.saveImage(MultipartFile file, String imgName)
ImageHelper.generateThumbnail(String sourcePath, String targetPath, int width, int height) ImageHelper.generateThumbnail(String sourcePath, String targetPath, int width, int height)
ImageHelper.addWatermark(String filePath, String watermark) ImageHelper.addWatermark(String filePath, String watermark)

View File

@ -52,6 +52,12 @@
<artifactId>thumbnailator</artifactId> <artifactId>thumbnailator</artifactId>
<version>0.4.9</version> <version>0.4.9</version>
</dependency> </dependency>
<!-- 验证码示例 -->
<dependency>
<groupId>com.github.whvcse</groupId>
<artifactId>easy-captcha</artifactId>
<version>1.6.2</version>
</dependency>
</dependencies> </dependencies>