Spring Boot 实现文件本地以及OSS上传」的摘要信息

Spring Boot 实现文件上传 Maven依赖 <dependency> <groupId>com.aliyun.oss</groupId> <artifactId>aliyun-sdk-oss</artifactId> <version>3.15.1</version> </dependency> 上传到本地 package yang.controller; import java.util.UUID; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import java.io.File; import java.io.IOException; @RestController @RequestMapping("/upload") public class UploadController { @PostMapping public void upload(@RequestPart MultipartFile file) throws IOException { // 获取文件名 String fileName = file.getOriginal...