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 with org.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