Skip to content

Commit

Permalink
fixed issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lWoHvYe committed Apr 6, 2024
1 parent 72fb862 commit a2b6bc3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@ spring:
# 添加prefix,从/some-resource变为/api/some-resource
#- PrefixPath=/api
- AddRequestHeader=X-Forwarded-Prefix, /res/res-mvc
- id: resource-service-flux
uri: http://localhost:8091
predicates:
- Path=/res/res-flux/**
filters:
- TokenRelay=
# 下面这俩的顺序是有影响的,要注意
# 剥去一段,/res/some-resource变为/some-resource
- StripPrefix=2
# 添加prefix,从/some-resource变为/api/some-resource
#- PrefixPath=/api
- AddRequestHeader=X-Forwarded-Prefix, /res/res-flux
- id: security-service
uri:
https://localhost:8081
Expand Down Expand Up @@ -121,4 +133,4 @@ springdoc:
disabled: true

messages:
base-uri: http://127.0.0.1:8090/api/messages
base-uri: http://127.0.0.1:8091/api/messages
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public Flux<Integer> generateNumbers() {
return numbers.delayElements(Duration.ofSeconds(1));
}

// http://127.0.0.1:8080/res/concatNumbers
// http://127.0.0.1:8080/res/res-flux/api/concatNumbers
@GetMapping(value = "/api/concatNumbers", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public Flux<String> generateConcatNumbers() {
// 创建包含初始字符串 "starting" 的 Flux
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class NumberController {
@Autowired
CustomizeUserRepository customizeUserRepository;

// http://127.0.0.1:8080/res/res-mvc/concatNumbers
// http://127.0.0.1:8080/res/res-mvc/api/concatNumbers
@GetMapping(value = "/api/concatNumbers", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public Flux<String> generateConcatNumbers() {
// 创建包含初始字符串 "starting" 的 Flux
Expand Down

0 comments on commit a2b6bc3

Please sign in to comment.