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
Field and Class should be avoided in elements that participate in the context cache key, but currently BeanOverrideContextCustomizer uses a Set<Class>
OverrideMetadata would be a candidate to represent logically equal override points, but it does store the Field for now
As a consequence of removing the Field from OverrideMetadata, we'd have to figure a way to accommodate for qualifiers. BeanFactory.isAutowireCandidate isn't such a good option anymore unless we can get away with storing these mappings in the BeanOverrideRegistrar somehow.
For context caching purposes, a good litmus test is to copy a test class that has the @SpringJUnitConfig annotation and run both test classes with the logging level of org.springframework.test.context.cache set to debug. The last logging statement about the number of cached contexts should then be 1, not 2.
The text was updated successfully, but these errors were encountered:
It turns out that the only sensible way to restore a correct use of the TCF cache is by passing the identified metadata to the object that needs it, and that make it fail with AOT.
The current status on main was changed to attempt to make the feature work with AOT. This confirms what was suggested in #32925 (comment).
Field
andClass
should be avoided in elements that participate in the context cache key, but currentlyBeanOverrideContextCustomizer
uses aSet<Class>
OverrideMetadata
would be a candidate to represent logically equal override points, but it does store theField
for nowField
fromOverrideMetadata
, we'd have to figure a way to accommodate for qualifiers.BeanFactory.isAutowireCandidate
isn't such a good option anymore unless we can get away with storing these mappings in theBeanOverrideRegistrar
somehow.For context caching purposes, a good litmus test is to copy a test class that has the
@SpringJUnitConfig
annotation and run both test classes with the logging level oforg.springframework.test.context.cache
set todebug
. The last logging statement about the number of cached contexts should then be 1, not 2.The text was updated successfully, but these errors were encountered: