You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
ImportAwareLinksDiscoverer is relying on ResolvableType to figure out whether the bean type implements ImportAware. Unfortunately, some bean definitions doesn't have one so we should fallback to the beanClassName if necessary.
The text was updated successfully, but these errors were encountered:
snicoll
changed the title
ImportAware link is not detected if the bean definition does not have a ResolvableType
ImportAware links are being called inconsistently
Sep 27, 2021
On a second look, this is rather a different problem. We're taking the parent configuration class as the import link whereas framework really means the import semantic. So, for instance, if you have a inner class of a configuration class that's import aware, the AOT engine will honor the callback whereas the JVM would not (as the inner class wasn't @Import'ed).
Unfortunately, there's no API to access that information as the ImportStack is computed at runtime. We will have to change something in our override of ConfigurationClassParser for this.
This commit refines our strategy to invoke ImportAware callbacks to use
framework's ImportRegistry rather than running our own logic. At build
time, we know requested the importing class of each bean that is
import aware, and store that in a registry of our own. This is latter
used to write the links that ImportAwareInvoker uses at build time.
ImportAwareInvoker has also been refined to not invoke the callback if
no import class is registered. Previously, it was throwing an innacurate
exception as this is possible for an import aware configuration class to
be processed directly (i.e. without a corresponding import arrangement).
Closesgh-1079
This commit refines our strategy to invoke ImportAware callbacks to use
framework's ImportRegistry rather than running our own logic. At build
time, we know requested the importing class of each bean that is
import aware, and store that in a registry of our own. This is latter
used to write the links that ImportAwareInvoker uses at build time.
ImportAwareInvoker has also been refined to not invoke the callback if
no import class is registered. Previously, it was throwing an innacurate
exception as this is possible for an import aware configuration class to
be processed directly (i.e. without a corresponding import arrangement).
Closesgh-1079
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
ImportAwareLinksDiscoverer
is relying onResolvableType
to figure out whether the bean type implementsImportAware
. Unfortunately, some bean definitions doesn't have one so we should fallback to thebeanClassName
if necessary.The text was updated successfully, but these errors were encountered: