From b7de4020cb034d1d74937cb31f1099215253ff7f Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Fri, 18 Nov 2022 09:39:41 +0100 Subject: [PATCH] Mention @RegisterReflectionForBinding in the docs Closes gh-32903 --- .../src/docs/asciidoc/native-image/advanced-topics.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/advanced-topics.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/advanced-topics.adoc index ccbe657da30..285758ebe00 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/advanced-topics.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/advanced-topics.adoc @@ -141,7 +141,9 @@ include::code:MyRuntimeHints[] You can then use `@ImportRuntimeHints` on any `@Configuration` class (for example your `@SpringBootApplication` annotated application class) to activate those hints. - +If you have classes which needs binding (mostly needed when serializing or deserializing JSON), you can use {spring-framework-docs}/core.html#aot-hints-register-reflection-for-binding[`@RegisterReflectionForBinding`] on any bean. +Most of the hints are automatically inferred, for example when accepting or returning data from a `@RestController` method. +But when you work with `WebClient` or `RestTemplate` directly, you might need to use `RegisterReflectionForBinding`. [[native-image.advanced.custom-hints.testing]] ==== Testing custom hints