Commit 21e61fb0a1950b0a912d4a3a87a2aa7c316a66cb

Authored by zhangdaiscott
1 parent 2a19f52e

gateway访问默认进入swagger文档首页

字典【是否启用】按钮会错误的保存状态 #2311
ant-design-vue-jeecg/src/views/system/modules/DictItemModal.vue
... ... @@ -94,6 +94,7 @@
94 94 edit(record) {
95 95 if (record.id) {
96 96 this.dictId = record.dictId;
  97 + this.status = record.status;
97 98 this.visibleCheck = (record.status == 1) ? true : false;
98 99 }
99 100 this.form.resetFields();
... ...
jeecg-boot/jeecg-cloud-module/jeecg-cloud-gateway/src/main/java/org/jeecg/config/GatewayRoutersConfiguration.java
... ... @@ -3,16 +3,20 @@ package org.jeecg.config;
3 3 import lombok.extern.slf4j.Slf4j;
4 4 import org.jeecg.handler.HystrixFallbackHandler;
5 5 import org.springframework.beans.factory.annotation.Value;
6   -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
7 6 import org.springframework.context.annotation.Bean;
8 7 import org.springframework.context.annotation.Configuration;
9 8 import org.springframework.http.MediaType;
10 9 import org.springframework.web.reactive.function.server.RequestPredicates;
11 10 import org.springframework.web.reactive.function.server.RouterFunction;
12 11 import org.springframework.web.reactive.function.server.RouterFunctions;
  12 +import org.springframework.web.reactive.function.server.ServerResponse;
13 13  
14 14 import javax.annotation.Resource;
15 15  
  16 +import static org.springframework.web.reactive.function.server.RequestPredicates.GET;
  17 +import static org.springframework.web.reactive.function.server.RouterFunctions.route;
  18 +import static org.springframework.web.reactive.function.server.ServerResponse.ok;
  19 +
16 20 /**
17 21 * @author scott
18 22 * @date 2020/05/26
... ... @@ -74,6 +78,11 @@ public class GatewayRoutersConfiguration {
74 78  
75 79 }
76 80  
  81 + @Bean
  82 + public RouterFunction<ServerResponse> indexRouter(@Value("classpath:/META-INF/resources/doc.html") final org.springframework.core.io.Resource indexHtml) {
  83 + return route(GET("/"), request -> ok().contentType(MediaType.TEXT_HTML).syncBody(indexHtml));
  84 + }
  85 +
77 86 @Resource
78 87 private HystrixFallbackHandler hystrixFallbackHandler;
79 88  
... ...