Reachability Metadata & RuntimeHints
How Spring declares what the native build cannot infer: the registrar API, the hint categories, the declarative annotations, the community metadata repository, and the reflective processor mechanism. Practical knowledge for anyone who has actually shipped a native image.
part ofSpring Frameworkoverview, primer and where to startread it →on this pageshowhide
explore
- RuntimeHintsRegistrar5 questions
- Hint Categories6 questions
- @RegisterReflectionForBinding5 questions
- @ImportRuntimeHints5 questions
- Reachability Metadata Repository5 questions
- @Reflective & ReflectiveProcessor5 questions
questions
page 2 of 2What is the ClassLoader parameter of registerHints for, and how do you decide between a RuntimeHintsRegistrar, @RegisterReflectionForBinding, and a BeanRegistrationAotProcessor?
level: principalimportance: nice to knowfreq 20%
basics
~20 sThe ClassLoader lets you register hints conditionally — e.g. only if an optional dependency is on the classpath (ClassUtils.isPresent). Choose @RegisterReflectionForBinding for simple binding types, RuntimeHintsRegistrar for general programmatic hints, and a BeanRegistrationAotProcessor when hints must be derived per bean during AOT.
showing 31–31 of 31