Add support for @Nonbinding in @jakarta.inject.Qualifier annotations #26302
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Affects:
5.3.2
In our project we reuse Java annotations across Framework boundaries (Spring/CDI/Micronaut). It turns our that Spring does not fully support the semantics of
javax.inject.Qualifier
annotations. Specifically, Spring Framework should support the marking of annotation fields with the@Nonbinding
annotation. This would be especially useful when using@Bean
methods together withorg.springframework.beans.factory.InjectionPoint
.I have created a demo application to show the current behavior and desired behavior:
https://github.com/ghillert/spring-injectionpoint-demo
Please see especially:
https://github.com/ghillert/spring-injectionpoint-demo/blob/main/src/main/java/com/hillert/injectionpoint/config/AppConfig.java
It looks like @jhoeller aknowledged the issue in 2016:
https://gist.github.com/moelholm/4317e93f18b02e9582afefc152debb44
For reference:
Java EE JavaDoc - Annotation Type Nonbinding
https://javaee.github.io/javaee-spec/javadocs/javax/enterprise/util/Nonbinding.html
Advanced Using @Nonbinding to combine a configuration annotation and a qualifier annotation into one annotation
https://dzone.com/articles/cdi-di-p2
The text was updated successfully, but these errors were encountered: