Support default methods in @HttpExchange interface

Closes gh-28491
This commit is contained in:
rstoyanchev
2022-05-25 09:24:15 +01:00
parent e2798560c7
commit cc56da7735
2 changed files with 19 additions and 2 deletions

View File

@@ -100,6 +100,8 @@ public class HttpServiceMethodTests {
Mono<ResponseEntity<Flux<String>>> fluxEntity= service.getFluxEntity();
StepVerifier.create(fluxEntity.flatMapMany(HttpEntity::getBody)).expectNext("request", "To", "Entity", "Flux").verifyComplete();
verifyClientInvocation("requestToEntityFlux", BODY_TYPE);
assertThat(service.getDefaultMethodValue()).isEqualTo("default value");
}
@Test
@@ -228,6 +230,10 @@ public class HttpServiceMethodTests {
@GetExchange
Mono<ResponseEntity<Flux<String>>> getFluxEntity();
default String getDefaultMethodValue() {
return "default value";
}
}