分布式项目中--上传文件步骤
第一步: 将FastDFSClient工具类放置在common(公共模块)下 第二步: 1.在resources包下,新建一个目录fastDFS,将配置文件fdfs_client.conf 放在该目录下 2.在resources包下,新建一个目录config,将配置文件application.properties配置文件 放在该目录下 第三步: 编写controller层 controller层代码如下: package cn.kgc.core.controller; import cn.kgc.core.pojo.entity.Result; import cn.kgc.core.util.FastDFSClient; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @RestController @RequestMapping("/upload")