Skip to content

AOT-generated CGLib proxies do not contain method overrides #34642

Open
@dsyer

Description

@dsyer

My observation is that method overrides (e.g., ReplaceOverride and LookupOverride) 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.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)theme: aotAn issue related to Ahead-of-time processingtype: bugA general bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions