更新file文档
This commit is contained in:
parent
a1aba78a5e
commit
de180197db
|
@ -13,6 +13,14 @@ compile("com.diboot:diboot-file-spring-boot-starter:2.0.5")
|
|||
<version>2.0.5</version>
|
||||
</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初次加载时自动初始化。
|
||||
|
||||
> 如果使用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)
|
||||
|
|
|
@ -52,6 +52,12 @@
|
|||
<artifactId>thumbnailator</artifactId>
|
||||
<version>0.4.9</version>
|
||||
</dependency>
|
||||
<!-- 验证码示例 -->
|
||||
<dependency>
|
||||
<groupId>com.github.whvcse</groupId>
|
||||
<artifactId>easy-captcha</artifactId>
|
||||
<version>1.6.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
Loading…
Reference in New Issue