Affects: 6.0.0-RC4
There are situations where tests needs to be able to perform reflection that isn't required at runtime. For such tests, it would be useful if the test class itself could contribute reflection hints using the usual mechanisms such as @Reflective
, @ImportRuntimeHints
, and @RegisterReflectionForBinding
.
Comment From: sbrannen
It is possible to register hints for individual test classes via the org.springframework.test.context.aot.TestRuntimeHintsRegistrar
SPI; however, that requires that a custom TestRuntimeHintsRegistrar
be registered via aot.factories
.
So I agree that support for registering hints local to a particular test class (for example, via the aforementioned standard annotations) could be useful.