1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

Merge code from upstream

This commit is contained in:
ly
2019-07-23 21:34:04 +08:00
parent 5cf28cb7a6
commit af09456b7d
587 changed files with 443 additions and 40842 deletions

View File

@@ -20,7 +20,7 @@
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>alibaba-sentinel-spring-cloud-starter</artifactId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<dependency>

View File

@@ -37,6 +37,13 @@ public class SentinelWebFluxController {
.transform(new SentinelReactorTransformer<>("mono"));
}
@GetMapping("/test")
public Mono<String> test() {
return Mono.just("simple string")
// transform the publisher here.
.transform(new SentinelReactorTransformer<>("test"));
}
@GetMapping("/flux")
public Flux<String> flux() {
return Flux.fromArray(new String[] { "a", "b", "c" })
@@ -44,11 +51,4 @@ public class SentinelWebFluxController {
.transform(new SentinelReactorTransformer<>("flux"));
}
@GetMapping("/test")
public Flux<String> test() {
return Flux.fromArray(new String[] { "test" })
// transform the publisher here.
.transform(new SentinelReactorTransformer<>("test"));
}
}

View File

@@ -1,4 +1,4 @@
spring.application.name=sentinel-example
spring.application.name=sentinel-webflux-example
server.port=18084
management.endpoints.web.exposure.include=*
spring.cloud.sentinel.transport.dashboard=localhost:8080