File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ public class PersonHandler {
94
94
Mono<ServerResponse> notFound = ServerResponse.notFound().build();
95
95
Mono<Person> personMono = this.repository.getPerson(personId);
96
96
return personMono
97
- .then (person -> ServerResponse.ok().contentType(APPLICATION_JSON).body(fromObject(person)))
97
+ .flatMap (person -> ServerResponse.ok().contentType(APPLICATION_JSON).body(fromObject(person)))
98
98
.switchIfEmpty(notFound);
99
99
}
100
100
}
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ Mono<Account> account = client.get()
150
150
.url("/accounts/{id}", 1L)
151
151
.accept(APPLICATION_JSON)
152
152
.exchange(request)
153
- .then (response -> response.bodyToMono(Account.class));
153
+ .flatMap (response -> response.bodyToMono(Account.class));
154
154
----
155
155
156
156
You can’t perform that action at this time.
0 commit comments