From 7ff25d6adc847ef830c93b7ba0b2b3d5a13261bf Mon Sep 17 00:00:00 2001
From: xiaojie <550345579@qq.com>
Date: Fri, 22 May 2026 15:07:22 +0800
Subject: [PATCH 1/2] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9fs-admin?=
=?UTF-8?q?=E6=89=93=E5=8C=85=E9=85=8D=E7=BD=AE=EF=BC=8C=E6=89=93=E5=8C=85?=
=?UTF-8?q?fs-admin=E6=97=B6=E9=A2=84=E5=85=88=E6=89=93=E5=8C=85=E5=89=8D?=
=?UTF-8?q?=E7=AB=AF=EF=BC=8C=E7=84=B6=E5=90=8E=E5=A4=8D=E5=88=B6=E5=89=8D?=
=?UTF-8?q?=E7=AB=AF=E6=89=93=E5=8C=85=E7=BB=93=E6=9E=9C=E4=B8=AD=E7=9A=84?=
=?UTF-8?q?index.html=E5=88=B0templates=E6=96=87=E4=BB=B6=E5=A4=B9?=
=?UTF-8?q?=EF=BC=8C=E5=A4=8D=E5=88=B6=E5=85=B6=E4=BB=96=E5=86=85=E5=AE=B9?=
=?UTF-8?q?=E5=88=B0static=E6=96=87=E4=BB=B6=E5=A4=B9=EF=BC=8C=E6=B3=A8?=
=?UTF-8?q?=E6=84=8F=E4=BF=AE=E6=94=B9=E5=89=8D=E7=AB=AF=E6=A0=B9=E7=9B=AE?=
=?UTF-8?q?=E5=BD=95D:\UGit\freefs\free-fs-frontend=202=E3=80=81=E5=B0=86?=
=?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=89=93=E5=8C=85=E5=90=8E=E7=9A=84=E6=96=87?=
=?UTF-8?q?=E4=BB=B6=E4=BD=9C=E4=B8=BA=E6=A8=A1=E7=89=88=E7=BB=9F=E4=B8=80?=
=?UTF-8?q?=E6=89=93=E5=8C=85=E4=B8=BAjar=EF=BC=8C=E6=96=B9=E4=BE=BF?=
=?UTF-8?q?=E9=83=A8=E7=BD=B2=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=BA=86IndexCont?=
=?UTF-8?q?roller=E6=96=B9=E4=BE=BF=E8=AE=BF=E9=97=AE=E5=89=8D=E7=AB=AF?=
=?UTF-8?q?=E6=89=93=E5=8C=85=E5=90=8E=E7=9A=84=E8=B5=84=E6=BA=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 6 +-
fs-admin/pom.xml | 94 +++++++++++++++++++
.../fs/controller/IndexController.java | 62 ++++++++++++
fs-admin/src/main/resources/application.yml | 10 +-
4 files changed, 166 insertions(+), 6 deletions(-)
create mode 100644 fs-admin/src/main/java/com/xddcodec/fs/controller/IndexController.java
diff --git a/.gitignore b/.gitignore
index 5ad5761e..d9f4f9aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,4 +41,8 @@ logs/
.qoder/
-.kiro/
\ No newline at end of file
+.kiro/
+fs-admin/src/main/resources/application-xydev.yml
+fs-admin/src/main/resources/application-xyprod.yml
+/fs-admin/src/main/resources/static/pc
+/fs-admin/src/main/resources/templates/index.html
diff --git a/fs-admin/pom.xml b/fs-admin/pom.xml
index b94ff18c..41022ff9 100644
--- a/fs-admin/pom.xml
+++ b/fs-admin/pom.xml
@@ -69,6 +69,64 @@
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 3.5.0
+
+
+ install-frontend-dependencies
+ generate-resources
+
+ exec
+
+
+ pnpm
+ D:\workspace\OpenSoucre\UGit\freefs-myfork\free-fs-frontend
+
+ install
+
+
+
+
+ build-frontend
+ generate-resources
+
+ exec
+
+
+ pnpm
+ D:\workspace\OpenSoucre\UGit\freefs-myfork\free-fs-frontend
+
+ run
+ build
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ 3.1.0
+
+
+ clean-frontend-resources
+ process-resources
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
org.apache.maven.plugins
maven-resources-plugin
@@ -91,6 +149,42 @@
+
+ copy-frontend-index
+ process-resources
+
+ copy-resources
+
+
+ ${project.build.outputDirectory}/templates
+
+
+ D:\workspace\OpenSoucre\UGit\freefs-myfork\free-fs-frontend\dist
+
+ index.html
+
+
+
+
+
+
+ copy-frontend-static
+ process-resources
+
+ copy-resources
+
+
+ ${project.build.outputDirectory}/static
+
+
+ D:\workspace\OpenSoucre\UGit\freefs-myfork\free-fs-frontend\dist
+
+ index.html
+
+
+
+
+
diff --git a/fs-admin/src/main/java/com/xddcodec/fs/controller/IndexController.java b/fs-admin/src/main/java/com/xddcodec/fs/controller/IndexController.java
new file mode 100644
index 00000000..3131e51a
--- /dev/null
+++ b/fs-admin/src/main/java/com/xddcodec/fs/controller/IndexController.java
@@ -0,0 +1,62 @@
+package com.xddcodec.fs.controller;
+
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * @author xiao
+ */
+@Controller
+public class IndexController {
+
+ /**
+ * 默认进入系统页面,系统首页
+ */
+ @RequestMapping(value= {"/", "/view/**"})
+ public String index(HttpServletRequest request, HttpServletResponse response) {
+ String requestURI = request.getRequestURI();
+// todo 后续如果加入移动端代码放开此部分代码
+// if ("/".equals(requestURI)) {
+// if (isMobile(request)) {
+// return "redirect:/mv/";
+// }
+// return "redirect:/pv/";
+// } else {
+// if (isMobile(request)) {
+// return "redirect:" + requestURI.replaceFirst("/view", "/mv");
+// }
+// return "redirect:" + requestURI.replaceFirst("/view", "/pv");
+// }
+ return "redirect:/pv/";
+ }
+
+ /**
+ * pc端 系统首页
+ */
+ @RequestMapping("/pv/**")
+ public String pvindex(HttpServletRequest request, HttpServletResponse response) {
+ return "index";
+ }
+
+ /**
+ * 移动端 系统首页
+ */
+ @RequestMapping("/mv/**")
+ public String mvindex(HttpServletRequest request, HttpServletResponse response) {
+ return "mobile";
+ }
+
+ /**
+ * 去登陆页
+ */
+ @RequestMapping("/login")
+ public String login(HttpServletRequest request, HttpServletResponse response) {
+// todo 后续如果加入移动端代码放开此部分代码
+// if (isMobile(request)) {
+// return "redirect:/mv/login";
+// }
+ return "redirect:/pv/login";
+ }
+}
diff --git a/fs-admin/src/main/resources/application.yml b/fs-admin/src/main/resources/application.yml
index fae869cf..30e7ac97 100644
--- a/fs-admin/src/main/resources/application.yml
+++ b/fs-admin/src/main/resources/application.yml
@@ -39,11 +39,11 @@ spring:
messages:
basename: i18n/messages
encoding: UTF-8
- # 模版引擎配置
- # thymeleaf:
- # mode: LEGACYHTML5
- # prefix: classpath:/templates/
- # encoding: UTF-8
+ # 模版引擎配置 用于后端 统一打包前端 前端打包后的index.html直接放置到 /templates/index.html 同理移动端配置打包后的入口文件为mobile.html放置在/templates/mobile.html,其他静态资源放置在static即可
+ thymeleaf:
+ mode: LEGACYHTML5
+ prefix: classpath:/templates/
+ encoding: UTF-8
# 邮件配置
mail:
--
Gitee
From 1c281028bd9b98e5e36b0649af9bd420a1e6ceb6 Mon Sep 17 00:00:00 2001
From: xiaojie <550345579@qq.com>
Date: Fri, 22 May 2026 15:59:22 +0800
Subject: [PATCH 2/2] =?UTF-8?q?log=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 2 +
.../src/main/resources/logback-spring.xml | 78 -------------------
2 files changed, 2 insertions(+), 78 deletions(-)
delete mode 100644 fs-admin/src/main/resources/logback-spring.xml
diff --git a/.gitignore b/.gitignore
index d9f4f9aa..0aea9851 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,3 +46,5 @@ fs-admin/src/main/resources/application-xydev.yml
fs-admin/src/main/resources/application-xyprod.yml
/fs-admin/src/main/resources/static/pc
/fs-admin/src/main/resources/templates/index.html
+fs-admin/src/main/resources/logback-spring.xml
+fs-admin/src/main/resources/logback-spring.xml
diff --git a/fs-admin/src/main/resources/logback-spring.xml b/fs-admin/src/main/resources/logback-spring.xml
deleted file mode 100644
index e2e39d9c..00000000
--- a/fs-admin/src/main/resources/logback-spring.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
- logback
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${CONSOLE_LOG_PATTERN}
-
- UTF-8
-
-
-
-
-
-
-
-
-
- ${log.path}/${application_name}.%d{yyyy-MM-dd}.log
-
- 30
-
-
- ${FILE_LOG_PATTERN}
-
- UTF-8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
--
Gitee