Delete ReactiveEventServer.java

This commit is contained in:
micropatel 2018-07-09 19:32:27 -03:00 committed by GitHub
parent 733f3f50c8
commit d9d9b5731c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 21 deletions

View File

@ -1,21 +0,0 @@
package com.baeldung.reactive.controller;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Flux;
import java.time.Duration;
@RestController
@RequestMapping("/events")
public class ReactiveEventServer {
@GetMapping(path = "/stream/" , produces=MediaType.TEXT_EVENT_STREAM_VALUE)
public Flux<String> eventStream() {
return Flux.interval(Duration.ofSeconds(1)).map(tick -> {return "Event:" + tick;});
}
}