Commit 21e61fb0a1950b0a912d4a3a87a2aa7c316a66cb
1 parent
2a19f52e
gateway访问默认进入swagger文档首页
字典【是否启用】按钮会错误的保存状态 #2311
Showing
2 changed files
with
11 additions
and
1 deletions
ant-design-vue-jeecg/src/views/system/modules/DictItemModal.vue
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 | |
... | ... |