File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
jeecg-boot/jeecg-cloud-module/jeecg-cloud-gateway/src/main/java/org/jeecg/config Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 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 RouterFunction routerFunction() {
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
You can’t perform that action at this time.
0 commit comments