Fix Spring 5 tests
This commit is contained in:
parent
e72744dbd0
commit
744799630f
@ -21,7 +21,7 @@ public class FormHandler {
|
|||||||
.filter(formData -> "baeldung".equals(formData.get("user")))
|
.filter(formData -> "baeldung".equals(formData.get("user")))
|
||||||
.filter(formData -> "you_know_what_to_do".equals(formData.get("token")))
|
.filter(formData -> "you_know_what_to_do".equals(formData.get("token")))
|
||||||
.flatMap(formData -> ok().body(Mono.just("welcome back!"), String.class))
|
.flatMap(formData -> ok().body(Mono.just("welcome back!"), String.class))
|
||||||
.or(ServerResponse.badRequest().build());
|
.switchIfEmpty(ServerResponse.badRequest().build());
|
||||||
}
|
}
|
||||||
|
|
||||||
Mono<ServerResponse> handleUpload(ServerRequest request) {
|
Mono<ServerResponse> handleUpload(ServerRequest request) {
|
||||||
@ -34,8 +34,7 @@ public class FormHandler {
|
|||||||
.asByteBuffer()
|
.asByteBuffer()
|
||||||
.array().length));
|
.array().length));
|
||||||
|
|
||||||
return ok()
|
return ok().body(fromObject(atomicLong.toString()));
|
||||||
.body(fromObject(atomicLong.toString()));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user