AOT-generated CGLib proxies do not contain method overrides #34642
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
theme: aot
An issue related to Ahead-of-time processing
type: bug
A general bug
Milestone
My observation is that method overrides (e.g.,
ReplaceOverride
andLookupOverride
) work fine with no AOT processing, but as soon as an AOT build is carried out, the generated subclasses do not contain the indirection, so you just get the behavior from the base class for all methods (even when AOT is not enabled at runtime).If for some reason we cannot actually transform this properly, we should throw an exception rather than silently skip the method overrides.
It's interesting to note that this is the first time I actually needed to use method overrides in 20 years of using Spring. I'd love to be able to AOT them - there doesn't seem to be a technical reason not to.
The text was updated successfully, but these errors were encountered: