From bd13a42b7d134f5dd87bd9b6501dc9debbd4ad28 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Fri, 14 Oct 2022 17:42:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E8=BF=9B=E5=BA=A6=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fileupload/FileUploadController.java | 20 +++++++++---------- code/web/car_dealer/index.html | 20 +++++++++++++++++-- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/code/java/car_dealer/src/main/java/com/cpic/xim/car_dealer/controllers/fileupload/FileUploadController.java b/code/java/car_dealer/src/main/java/com/cpic/xim/car_dealer/controllers/fileupload/FileUploadController.java index 154a2d0..22b9e3f 100644 --- a/code/java/car_dealer/src/main/java/com/cpic/xim/car_dealer/controllers/fileupload/FileUploadController.java +++ b/code/java/car_dealer/src/main/java/com/cpic/xim/car_dealer/controllers/fileupload/FileUploadController.java @@ -2,7 +2,7 @@ * @Author: Kane * @Date: 2022-09-28 15:47:02 * @LastEditors: Kane - * @LastEditTime: 2022-10-11 11:06:56 + * @LastEditTime: 2022-10-14 10:11:23 * @FilePath: \car_dealer\src\main\java\com\cpic\xim\car_dealer\controllers\fileupload\FileUploadController.java * @Description: 用于实现跨域功能的过滤器对象。 * Copyright (c) ${2022} by Kane, All Rights Reserved. @@ -27,16 +27,16 @@ import org.springframework.web.multipart.MultipartFile; @RequestMapping( path = "/upload") public class FileUploadController { - @PostConstruct - public void init() - { - // WebApplicationContext webApplicationContext = - // ContextLoader.getCurrentWebApplicationContext(); - // ServletContext servletContext = webApplicationContext.getServletContext(); - // String realPath = servletContext.getRealPath( "" ); + // @PostConstruct + // public void init() + // { + // // WebApplicationContext webApplicationContext = + // // ContextLoader.getCurrentWebApplicationContext(); + // // ServletContext servletContext = webApplicationContext.getServletContext(); + // // String realPath = servletContext.getRealPath( "" ); - // System.out.println( realPath ); - } + // // System.out.println( realPath ); + // } /***************************************************** * 接收上传文件,并保存到临时目录: diff --git a/code/web/car_dealer/index.html b/code/web/car_dealer/index.html index f41078e..6892434 100644 --- a/code/web/car_dealer/index.html +++ b/code/web/car_dealer/index.html @@ -2,7 +2,7 @@ * @Author: Kane * @Date: 2022-10-11 22:49:54 * @LastEditors: Kane - * @LastEditTime: 2022-10-11 23:00:06 + * @LastEditTime: 2022-10-14 17:24:05 * @FilePath: \car_dealer\index.html * @Description: * @@ -18,5 +18,21 @@ - + +
+

测试

+
+ +