From ba4a21eee42a215ae42150d6cac681ccdb9e1c2f Mon Sep 17 00:00:00 2001 From: dingruichao <281809423@qq.com> Date: Sat, 7 Nov 2020 17:36:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86web=E9=A1=B9=E7=9B=AE=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E4=B8=AD=E7=9A=84header=E5=92=8Cfooter=E6=8F=90?= =?UTF-8?q?=E5=8F=96=E5=87=BA=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/framework/config/ShiroConfig.java | 1 + ruoyi-web/pom.xml | 18 --- .../web/controller/front/WebController.java | 2 +- ruoyi-web/src/main/resources/application.yml | 3 +- .../main/resources/templates/home/footer.html | 75 ++++++++++ .../main/resources/templates/home/header.html | 7 +- .../main/resources/templates/home/index.html | 137 +----------------- ruoyi-web/web/WEB-INF/web.xml | 6 - 8 files changed, 88 insertions(+), 161 deletions(-) delete mode 100644 ruoyi-web/web/WEB-INF/web.xml diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java index 8a2bb5726..47d966788 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java @@ -282,6 +282,7 @@ public class ShiroConfig //网站允许匿名访问 filterChainDefinitionMap.put("/home/**", "anon"); filterChainDefinitionMap.put("/images/**", "anon"); + filterChainDefinitionMap.put("/captcha/captchaImage**", "anon"); // 退出 logout地址,shiro去清除session filterChainDefinitionMap.put("/logout", "logout"); diff --git a/ruoyi-web/pom.xml b/ruoyi-web/pom.xml index b45392115..eff53c0a3 100644 --- a/ruoyi-web/pom.xml +++ b/ruoyi-web/pom.xml @@ -63,24 +63,6 @@ com.ruoyi ruoyi-framework - - - - com.ruoyi - ruoyi-quartz - - - - - com.ruoyi - ruoyi-generator - - - - com.ruoyi - ruoyi-front - - diff --git a/ruoyi-web/src/main/java/ruoyi/web/controller/front/WebController.java b/ruoyi-web/src/main/java/ruoyi/web/controller/front/WebController.java index 15857d3a4..409587277 100644 --- a/ruoyi-web/src/main/java/ruoyi/web/controller/front/WebController.java +++ b/ruoyi-web/src/main/java/ruoyi/web/controller/front/WebController.java @@ -13,6 +13,6 @@ public class WebController { */ @GetMapping("/index") public String index() - { return prefix + "/index"; + { return "index"; } } diff --git a/ruoyi-web/src/main/resources/application.yml b/ruoyi-web/src/main/resources/application.yml index 80da2cd76..b4ded615c 100644 --- a/ruoyi-web/src/main/resources/application.yml +++ b/ruoyi-web/src/main/resources/application.yml @@ -47,7 +47,8 @@ spring: mode: HTML encoding: utf-8 # 禁用缓存 - cache: false + cache: false #cache: 是否缓存,开发模式下设置为false,避免改了模板还要重启服务器,线上设置为true,可以提高性能。 + prefix: classpath:/templates/home/ # 资源信息 messages: # 国际化资源文件路径 diff --git a/ruoyi-web/src/main/resources/templates/home/footer.html b/ruoyi-web/src/main/resources/templates/home/footer.html index e69de29bb..d6e87b41b 100644 --- a/ruoyi-web/src/main/resources/templates/home/footer.html +++ b/ruoyi-web/src/main/resources/templates/home/footer.html @@ -0,0 +1,75 @@ + \ No newline at end of file diff --git a/ruoyi-web/src/main/resources/templates/home/header.html b/ruoyi-web/src/main/resources/templates/home/header.html index 10a7fc804..091b15377 100644 --- a/ruoyi-web/src/main/resources/templates/home/header.html +++ b/ruoyi-web/src/main/resources/templates/home/header.html @@ -1,5 +1,4 @@ - -
+
-
\ No newline at end of file + \ No newline at end of file diff --git a/ruoyi-web/src/main/resources/templates/home/index.html b/ruoyi-web/src/main/resources/templates/home/index.html index 50ef605c0..467d0b2a3 100644 --- a/ruoyi-web/src/main/resources/templates/home/index.html +++ b/ruoyi-web/src/main/resources/templates/home/index.html @@ -22,61 +22,9 @@ +
-
-
- - -
- -
-
-
- -
-
-
+
@@ -888,83 +836,9 @@
- - - + + +