|
|
|
|
@ -27,6 +27,7 @@ import org.springframework.aot.hint.predicate.RuntimeHintsPredicates;
@@ -27,6 +27,7 @@ import org.springframework.aot.hint.predicate.RuntimeHintsPredicates;
|
|
|
|
|
import org.springframework.http.client.AbstractClientHttpRequestFactoryWrapper; |
|
|
|
|
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; |
|
|
|
|
import org.springframework.http.client.JettyClientHttpRequestFactory; |
|
|
|
|
import org.springframework.http.client.ReactorClientHttpRequestFactory; |
|
|
|
|
import org.springframework.http.client.SimpleClientHttpRequestFactory; |
|
|
|
|
import org.springframework.util.ReflectionUtils; |
|
|
|
|
|
|
|
|
|
@ -72,6 +73,17 @@ class ClientHttpRequestFactoriesRuntimeHintsTests {
@@ -72,6 +73,17 @@ class ClientHttpRequestFactoriesRuntimeHintsTests {
|
|
|
|
|
.accepts(hints); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void shouldRegisterReactorHints() { |
|
|
|
|
RuntimeHints hints = new RuntimeHints(); |
|
|
|
|
new ClientHttpRequestFactoriesRuntimeHints().registerHints(hints, getClass().getClassLoader()); |
|
|
|
|
ReflectionHintsPredicates reflection = RuntimeHintsPredicates.reflection(); |
|
|
|
|
assertThat(reflection.onMethod(method(ReactorClientHttpRequestFactory.class, "setConnectTimeout", int.class))) |
|
|
|
|
.accepts(hints); |
|
|
|
|
assertThat(reflection.onMethod(method(ReactorClientHttpRequestFactory.class, "setReadTimeout", long.class))) |
|
|
|
|
.accepts(hints); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void shouldRegisterSimpleHttpHints() { |
|
|
|
|
RuntimeHints hints = new RuntimeHints(); |
|
|
|
|
|