application.properties
spring.resources.static-locations: file:${
web.web-root},file:${
web.upload-path}
web.upload-path=C:/
web.web-root=C:/
工具类
public class FileUtils {
public static String uploadImage(String path, MultipartFile file) throws IOException {
String fileName = file.getOriginalFilename();
if(!fileName.matches("^.*(jpg|png|gif|PNG|webp|jpeg)$")){<