From 00a1a792115e04e158ab6afae645970261097b8a Mon Sep 17 00:00:00 2001
From: fzhang5 <123456>
Date: Sun, 13 Jul 2025 20:33:07 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE=E6=96=87?=
=?UTF-8?q?=E4=BB=B6=E9=80=82=E9=85=8D=E5=A4=9A=E7=8E=AF=E5=A2=83=E4=B8=8B?=
=?UTF-8?q?=E7=9A=84=E6=89=93=E5=8C=85=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 40 +++++++++++++++++++++++--
src/main/resources/application-dev.yml | 27 +++++++++++++++++
src/main/resources/application-prod.yml | 27 +++++++++++++++++
src/main/resources/application-test.yml | 27 +++++++++++++++++
src/main/resources/application.yml | 28 ++---------------
5 files changed, 122 insertions(+), 27 deletions(-)
create mode 100644 src/main/resources/application-dev.yml
create mode 100644 src/main/resources/application-prod.yml
create mode 100644 src/main/resources/application-test.yml
diff --git a/pom.xml b/pom.xml
index 0a52229..efa49a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,6 +19,33 @@
+
+
+
+ dev
+
+ dev
+
+
+ true
+
+
+
+
+ test
+
+ test
+
+
+
+
+ prod
+
+ prod
+
+
+
+
@@ -33,10 +60,19 @@
+
+
+ src/main/resources
+
+
+ application*.yml
+ application.yml
+
+ true
+
+
-
-
org.springframework.boot
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
new file mode 100644
index 0000000..5b31922
--- /dev/null
+++ b/src/main/resources/application-dev.yml
@@ -0,0 +1,27 @@
+server:
+ port: 9191
+spring:
+ datasource:
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url: jdbc:mysql://139.196.201.231:3306/mall?serverTimezone=GMT%2b8&userSSL=false&allowPublicKeyRetrieval=true
+ username: "myuser"
+ password: 'Fzhang5.'
+ servlet:
+ multipart:
+ max-file-size: 30MB
+ redis:
+ database: 0
+ host: 139.196.201.231
+ port: 6379
+ password: Amk812s$
+ lettuce:
+ pool:
+ min-idle: 0
+ max-active: 8
+ max-idle: 8
+ max-wait: -1ms
+ connect-timeout: 30000ms
+
+file:
+ file: /home/fzhang5/file/file/
+ avatar: /home/fzhang5/file/avatar/
diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml
new file mode 100644
index 0000000..5b31922
--- /dev/null
+++ b/src/main/resources/application-prod.yml
@@ -0,0 +1,27 @@
+server:
+ port: 9191
+spring:
+ datasource:
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url: jdbc:mysql://139.196.201.231:3306/mall?serverTimezone=GMT%2b8&userSSL=false&allowPublicKeyRetrieval=true
+ username: "myuser"
+ password: 'Fzhang5.'
+ servlet:
+ multipart:
+ max-file-size: 30MB
+ redis:
+ database: 0
+ host: 139.196.201.231
+ port: 6379
+ password: Amk812s$
+ lettuce:
+ pool:
+ min-idle: 0
+ max-active: 8
+ max-idle: 8
+ max-wait: -1ms
+ connect-timeout: 30000ms
+
+file:
+ file: /home/fzhang5/file/file/
+ avatar: /home/fzhang5/file/avatar/
diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml
new file mode 100644
index 0000000..5b31922
--- /dev/null
+++ b/src/main/resources/application-test.yml
@@ -0,0 +1,27 @@
+server:
+ port: 9191
+spring:
+ datasource:
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url: jdbc:mysql://139.196.201.231:3306/mall?serverTimezone=GMT%2b8&userSSL=false&allowPublicKeyRetrieval=true
+ username: "myuser"
+ password: 'Fzhang5.'
+ servlet:
+ multipart:
+ max-file-size: 30MB
+ redis:
+ database: 0
+ host: 139.196.201.231
+ port: 6379
+ password: Amk812s$
+ lettuce:
+ pool:
+ min-idle: 0
+ max-active: 8
+ max-idle: 8
+ max-wait: -1ms
+ connect-timeout: 30000ms
+
+file:
+ file: /home/fzhang5/file/file/
+ avatar: /home/fzhang5/file/avatar/
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 9510fdb..3a386da 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -1,32 +1,10 @@
server:
port: 9191
-spring:
- datasource:
- driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://139.196.201.231:3306/mall?serverTimezone=GMT%2b8&userSSL=false&allowPublicKeyRetrieval=true
- username: "myuser"
- password: 'Fzhang5.'
- servlet:
- multipart:
- max-file-size: 30MB
- redis:
- database: 0
- host: 139.196.201.231
- port: 6379
- password: Amk812s$
- lettuce:
- pool:
- min-idle: 0
- max-active: 8
- max-idle: 8
- max-wait: -1ms
- connect-timeout: 30000ms
mybatis:
mapper-locations: classpath:mapper/*.xml
configuration:
map-underscore-to-camel-case: true
-
-file:
- file: /home/fzhang5/file/file/
- avatar: /home/fzhang5/file/avatar/
+spring:
+ profiles:
+ active: @profile@