From 29d77c89dfdbec1475ad0f6452ff720f09f17815 Mon Sep 17 00:00:00 2001 From: zhangdaihao Date: Mon, 5 Aug 2019 14:29:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BF=E9=97=AE=E5=90=8E=E5=8F=B0=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E8=BF=9B=E5=85=A5swagger=E6=8E=A5=E5=8F=A3=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/jeecg/config/WebMvcConfiguration.java | 5 +++-- .../src/main/resources/application.yml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/config/WebMvcConfiguration.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/config/WebMvcConfiguration.java index 3fcbf9e8..6ec3696d 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/config/WebMvcConfiguration.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/config/WebMvcConfiguration.java @@ -53,10 +53,11 @@ public class WebMvcConfiguration implements WebMvcConfigurer { } /** - * 访问根路径默认跳转 index.html页面 (简化部署方案: 可以把前端打包直接放到项目的 webapp,上面的配置) + * 方案一: 默认访问根路径跳转 doc.html页面 (swagger文档页面) + * 方案二: 访问根路径改成跳转 index.html页面 (简化部署方案: 可以把前端打包直接放到项目的 webapp,上面的配置) */ @Override public void addViewControllers(ViewControllerRegistry registry) { - registry.addViewController("/").setViewName("index.html"); + registry.addViewController("/").setViewName("doc.html"); } } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/application.yml b/jeecg-boot/jeecg-boot-module-system/src/main/resources/application.yml index 4b2ca418..99966a5e 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/application.yml +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/application.yml @@ -4,6 +4,6 @@ spring: swagger: production: false basic: - enable: true + enable: false username: jeecg password: jeecg1314 \ No newline at end of file -- GitLab