-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)theme: aotAn issue related to Ahead-of-time processingAn issue related to Ahead-of-time processingtype: bugA general bugA general bug
Milestone
Description
Consider the following configuration class:
@Configuration
public class MyConfiguration {
@Bean
A a() { return new A(); }
@Bean
B b() { return new B(this.a()); }
static class A {
public A() { System.out.println("A constructor"); }
}
static class B {
public B(A a) { System.out.println("B constructor"); }
}
}
On JVM in regular mode, it prints:
A constructor
B constructor
On JVM in AOT mode or native, while it seems CGLIB proxies are generated correctly at build time, but they seems not used since it prints:
A constructor
A constructor
B constructor
The code generated AOT maybe needs to be updated to leverage those CGLIB proxies.
Metadata
Metadata
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)theme: aotAn issue related to Ahead-of-time processingAn issue related to Ahead-of-time processingtype: bugA general bugA general bug