Convert Consumer<Foo> to Function<Flux<Foo>,Mono<Void>>
This results in a better experience for users because the consumer that they write is only applied to a Flux that is subscribed to by the framework once. It gives better control over the flow of foos, e.g. if some component wants to subscribe on a thread.
This commit is contained in:
@@ -44,8 +44,7 @@ public class SampleCompiledConsumerTests {
|
||||
@Test
|
||||
public void print() {
|
||||
assertThat(new TestRestTemplate().postForObject(
|
||||
"http://localhost:" + port + "/test", "it works", String.class))
|
||||
.isEqualTo("it works");
|
||||
"http://localhost:" + port + "/test", "it works", String.class)).isNull();
|
||||
assertEquals("it works", Reference.instance);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user