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); + } +}