From 0db69a88bfa6dbc94c81fbff816093802be977a8 Mon Sep 17 00:00:00 2001 From: tanghc Date: Tue, 31 Dec 2019 17:21:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89redis=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sop-admin/sop-admin-server/pom.xml | 7 +----- .../controller/IndexController.java | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/controller/IndexController.java diff --git a/sop-admin/sop-admin-server/pom.xml b/sop-admin/sop-admin-server/pom.xml index 0a5c6f60..1d9ab2ad 100644 --- a/sop-admin/sop-admin-server/pom.xml +++ b/sop-admin/sop-admin-server/pom.xml @@ -41,7 +41,7 @@ net.oschina.durcframework - easyopen-spring-boot-starter + easyopen 1.16.5 @@ -72,11 +72,6 @@ spring-boot-starter-thymeleaf - - org.springframework.boot - spring-boot-starter-data-redis - - org.springframework.boot spring-boot-starter-test diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/controller/IndexController.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/controller/IndexController.java new file mode 100644 index 00000000..a2b6b8e0 --- /dev/null +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/controller/IndexController.java @@ -0,0 +1,24 @@ +package com.gitee.sop.adminserver.controller; + +import com.gitee.easyopen.ApiConfig; +import com.gitee.easyopen.support.ApiController; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +/** + * api入口 + */ +@Controller +@RequestMapping("api") +public class IndexController extends ApiController { + + @Value("${easyopen.show-doc:false}") + private String showDoc; + + @Override + protected void initApiConfig(ApiConfig apiConfig) { + apiConfig.setShowDoc(Boolean.valueOf(showDoc)); + apiConfig.setIgnoreValidate(true); + } +}