1、导入依赖
<!-- fastdfs-client依赖-->
<dependency>
<groupId>com.github.tobato</groupId>
<artifactId>fastdfs-client</artifactId>
<version>1.27.2</version>
</dependency>
FastDFS工具类中有用到了redis
<!-- spring-boot提供的 redis-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<version>2.2.2.RELEASE</version>
</dependency>
2、数据表
CREATE TABLE `t_file` (
`id` bigint(12) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
`url` varchar(500) DEFAULT NULL COMMENT '文件存储路径',
`file_type` varchar(255) DEFAULT NULL COMMENT '文件类型',
`file_md5` varchar(500) DEF