Slide 9
Slide 9 text
WebFlux
@RestController
class DemoController(val demoService: DemoService) {
@GetMapping("demo")
fun handle(): Mono =
Mono.zip(
demoService.getMonoA(),
demoService.getMonoB()
)
.flatMap { demoService.getMonoC(it.t1, it.t2) }
.map { it.answer }
}
// dependencies
compile('org.springframework.boot:spring-boot-starter-webflux')