From 733f3f50c8d6daa95be823e53dc05061ee106ac0 Mon Sep 17 00:00:00 2001 From: micropatel <31759369+micropatel@users.noreply.github.com> Date: Mon, 9 Jul 2018 19:30:46 -0300 Subject: [PATCH] Delete ReactiveEventClient.java --- .../reactive/ReactiveEventClient.java | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 spring-5-reactive-client/src/test/java/com/baeldung/reactive/ReactiveEventClient.java diff --git a/spring-5-reactive-client/src/test/java/com/baeldung/reactive/ReactiveEventClient.java b/spring-5-reactive-client/src/test/java/com/baeldung/reactive/ReactiveEventClient.java deleted file mode 100644 index 6e421d7f5f..0000000000 --- a/spring-5-reactive-client/src/test/java/com/baeldung/reactive/ReactiveEventClient.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.baeldung.reactive; - -import org.springframework.boot.CommandLineRunner; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.web.reactive.function.client.WebClient; -import reactor.core.publisher.Flux; - -@SpringBootApplication -public class ReactiveEventClient implements CommandLineRunner { - public static void main(String[] args) { - System.setProperty("server.port","8090"); - SpringApplication.run(ReactiveEventClient.class, args); - } - - @Override - public void run(String... args) throws Exception { - WebClient webclient = WebClient.builder() - .defaultHeader(HttpHeaders.ACCEPT, MediaType.TEXT_EVENT_STREAM_VALUE) - .baseUrl("http://localhost:8080/events") - .build(); - - webclient.get().uri("/stream/").header(HttpHeaders.CONTENT_TYPE,MediaType.TEXT_HTML.toString()) - .retrieve().bodyToFlux(String.class) - .subscribe(System.out::println); - } -}