Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for @Nonbinding in @jakarta.inject.Qualifier annotations #26302

Open
ghillert opened this issue Dec 19, 2020 · 0 comments
Open

Add support for @Nonbinding in @jakarta.inject.Qualifier annotations #26302

ghillert opened this issue Dec 19, 2020 · 0 comments
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement

Comments

@ghillert
Copy link

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

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 19, 2020
@rstoyanchev rstoyanchev added the in: core Issues in core modules (aop, beans, core, context, expression) label Nov 11, 2021
@sbrannen sbrannen changed the title Add Support for @NonBinding in javax.inject.Qualifier annotations Add support for @NonBinding in @jakarta.inject.Qualifier annotations Jan 18, 2023
@sbrannen sbrannen changed the title Add support for @NonBinding in @jakarta.inject.Qualifier annotations Add support for @Nonbinding in @jakarta.inject.Qualifier annotations Jan 18, 2023
@jhoeller jhoeller self-assigned this Jan 18, 2023
@jhoeller jhoeller added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 24, 2023
@jhoeller jhoeller added this to the General Backlog milestone Nov 24, 2023
@bclozel bclozel changed the title Add support for @Nonbinding in @jakarta.inject.Qualifier annotations Add support for @Nonbinding in @jakarta.inject.Qualifier annotations Feb 14, 2024
@jhoeller jhoeller removed their assignment Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants