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,6 +94,7 @@
94 edit(record) { 94 edit(record) {
95 if (record.id) { 95 if (record.id) {
96 this.dictId = record.dictId; 96 this.dictId = record.dictId;
  97 + this.status = record.status;
97 this.visibleCheck = (record.status == 1) ? true : false; 98 this.visibleCheck = (record.status == 1) ? true : false;
98 } 99 }
99 this.form.resetFields(); 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,16 +3,20 @@ package org.jeecg.config;
3 import lombok.extern.slf4j.Slf4j; 3 import lombok.extern.slf4j.Slf4j;
4 import org.jeecg.handler.HystrixFallbackHandler; 4 import org.jeecg.handler.HystrixFallbackHandler;
5 import org.springframework.beans.factory.annotation.Value; 5 import org.springframework.beans.factory.annotation.Value;
6 -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;  
7 import org.springframework.context.annotation.Bean; 6 import org.springframework.context.annotation.Bean;
8 import org.springframework.context.annotation.Configuration; 7 import org.springframework.context.annotation.Configuration;
9 import org.springframework.http.MediaType; 8 import org.springframework.http.MediaType;
10 import org.springframework.web.reactive.function.server.RequestPredicates; 9 import org.springframework.web.reactive.function.server.RequestPredicates;
11 import org.springframework.web.reactive.function.server.RouterFunction; 10 import org.springframework.web.reactive.function.server.RouterFunction;
12 import org.springframework.web.reactive.function.server.RouterFunctions; 11 import org.springframework.web.reactive.function.server.RouterFunctions;
  12 +import org.springframework.web.reactive.function.server.ServerResponse;
13 13
14 import javax.annotation.Resource; 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 * @author scott 21 * @author scott
18 * @date 2020/05/26 22 * @date 2020/05/26
@@ -74,6 +78,11 @@ public class GatewayRoutersConfiguration { @@ -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 @Resource 86 @Resource
78 private HystrixFallbackHandler hystrixFallbackHandler; 87 private HystrixFallbackHandler hystrixFallbackHandler;
79 88