-
Notifications
You must be signed in to change notification settings - Fork 38.9k
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
Qualifiers aren't captured by AOT in the generated BeanDefinitions classes, leading to failures when running under AOT:
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in com.example.demo.DemoApplication$RequiresGrpcClient required a bean of type 'com.example.demo.DemoApplication$GrpClient' that could not be found.
The injection point has the following annotations:
- @com.example.demo.GrpcSpringClient("myclient")
The following candidates were found but could not be injected:
- User-defined bean
Action:
Consider revisiting the entries above or defining a bean of type 'com.example.demo.DemoApplication$GrpClient' in your configuration.
In our specific case, they're custom qualifier annotations and definitions registered by a registry post-processor. It appears for simple annotated Qualifier beans, the framework is able to fallback and infer the qualifier.
Example project:
Run and note the failure:
./gradlew bootJar && java -Dspring.aot.enabled=true -jar build/libs/demo-0.0.1-SNAPSHOT.jar
Metadata
Metadata
Assignees
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