From ca389f65d52acdc3621f50604f0f4c386f7447e3 Mon Sep 17 00:00:00 2001 From: tsukiyalo <2450026988@qq.com> Date: Tue, 5 Nov 2024 18:48:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bsz/school_send_back_end/contant/FileConstant.java | 2 +- .../controller/FileController.java | 2 +- .../src/main/resources/application.yml | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/FileConstant.java b/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/FileConstant.java index 19cc1b3..aa95c0e 100644 --- a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/FileConstant.java +++ b/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/FileConstant.java @@ -14,7 +14,7 @@ public interface FileConstant { /** * 服务器访问地址 */ - String SERVER_HOST = "http://39.101.78.35/images"; + String SERVER_HOST = "154.8.193.216:9494"; /** * 服务器上传路径 diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/FileController.java b/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/FileController.java index 0cb0822..3162758 100644 --- a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/FileController.java +++ b/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/FileController.java @@ -60,7 +60,7 @@ public class FileController { return ResultUtils.success(FileConstant.SERVER_HOST + filePath); } catch (IOException e) { - log.error("file upload error, filePath = " + filePath, e);http://39.101.78.35/images + log.error("file upload error, filePath = " + filePath, e); throw new BusinessException(ErrorCode.SYSTEM_ERROR,"上传失败"); } diff --git a/school_lend_back_end/src/main/resources/application.yml b/school_lend_back_end/src/main/resources/application.yml index dc7807f..554ab35 100644 --- a/school_lend_back_end/src/main/resources/application.yml +++ b/school_lend_back_end/src/main/resources/application.yml @@ -1,4 +1,7 @@ spring: + web: + resources: + static-locations: file:D:\test\images application: name: school_send_back_end datasource: @@ -9,8 +12,11 @@ spring: # url: jdbc:mysql://localhost:3306/school_send # username: root # password: 123456 - url: jdbc:mysql://39.101.78.35/school_send - username: school_send +# url: jdbc:mysql://39.101.78.35/school_send +# username: school_send +# password: 12345678 + url: jdbc:mysql://154.8.193.216/xiaokuaisong + username: xiaokuaisong password: 12345678 mvc: pathmatch: