Two hints registrar have been recently added that creates a cycle between those two packages. We should consider moving those, perhaps all the way up to spring-context
as they aren't really useful without it.
Comment From: snicoll
The tangle for spring factories hint is a little bit problematic as it relies on a package protected method in SpringFactories
, cc @philwebb
Comment From: philwebb
Tricky. There's just enough code in SpringFactoriesLoader.loadFactoriesResource
to make copy/paste unappealing. We could perhaps make it a protected static
method then have a private subclass in SpringFactoriesLoaderRuntimeHintsRegistrar
to access it again. Either that, or just make that method public.
Comment From: philwebb
It feels a bit odd to have spring-context
add the factory hints, I think I'd prefer a org.springframework.aot.support
package that takes care of registering hints for items in org.springframework.code
.
It would also be really nice to have a checkstyle rule to enforce the layering.