Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
property-management
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
property-management
Commits
5eb25418
Commit
5eb25418
authored
Mar 04, 2021
by
zhangdaiscott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gateway访问默认进入swagger文档首页
parent
462b0d17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
jeecg-boot/jeecg-cloud-module/jeecg-cloud-gateway/src/main/java/org/jeecg/config/GatewayRoutersConfiguration.java
+10
-1
No files found.
jeecg-boot/jeecg-cloud-module/jeecg-cloud-gateway/src/main/java/org/jeecg/config/GatewayRoutersConfiguration.java
View file @
5eb25418
...
@@ -3,16 +3,20 @@ package org.jeecg.config;
...
@@ -3,16 +3,20 @@ package org.jeecg.config;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecg.handler.HystrixFallbackHandler
;
import
org.jeecg.handler.HystrixFallbackHandler
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.reactive.function.server.RequestPredicates
;
import
org.springframework.web.reactive.function.server.RequestPredicates
;
import
org.springframework.web.reactive.function.server.RouterFunction
;
import
org.springframework.web.reactive.function.server.RouterFunction
;
import
org.springframework.web.reactive.function.server.RouterFunctions
;
import
org.springframework.web.reactive.function.server.RouterFunctions
;
import
org.springframework.web.reactive.function.server.ServerResponse
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
static
org
.
springframework
.
web
.
reactive
.
function
.
server
.
RequestPredicates
.
GET
;
import
static
org
.
springframework
.
web
.
reactive
.
function
.
server
.
RouterFunctions
.
route
;
import
static
org
.
springframework
.
web
.
reactive
.
function
.
server
.
ServerResponse
.
ok
;
/**
/**
* @author scott
* @author scott
* @date 2020/05/26
* @date 2020/05/26
...
@@ -74,6 +78,11 @@ public class GatewayRoutersConfiguration {
...
@@ -74,6 +78,11 @@ public class GatewayRoutersConfiguration {
}
}
@Bean
public
RouterFunction
<
ServerResponse
>
indexRouter
(
@Value
(
"classpath:/META-INF/resources/doc.html"
)
final
org
.
springframework
.
core
.
io
.
Resource
indexHtml
)
{
return
route
(
GET
(
"/"
),
request
->
ok
().
contentType
(
MediaType
.
TEXT_HTML
).
syncBody
(
indexHtml
));
}
@Resource
@Resource
private
HystrixFallbackHandler
hystrixFallbackHandler
;
private
HystrixFallbackHandler
hystrixFallbackHandler
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment