See gh-33384
This commit is contained in:
Johnny Lim
2022-11-28 08:25:10 +09:00
committed by Moritz Halbritter
parent 39a026ed65
commit 90589fd6d4
8 changed files with 14 additions and 16 deletions

View File

@@ -157,9 +157,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.
If you have classes which need 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`.
But when you work with `WebClient` or `RestTemplate` directly, you might need to use `@RegisterReflectionForBinding`.
[[native-image.advanced.custom-hints.testing]]
==== Testing custom hints