eclipse / microprofile-config

MicroProfile Configuration Feature
Apache License 2.0
213 stars 115 forks source link

Support integration with Guice for SE systems: Add javax.inject.Qualifier to ConfigProperty #777

Closed scr-oath closed 1 year ago

scr-oath commented 1 year ago

Description

As a:

...I need to be able to:

Create Guice bindings for fields, method or constructor parameters annotated with @ConfigProperty

...which enables me to:

This is currently blocked because Guice requires annotations to themselves be annotated with either com.google.inject.BindingAnnotation or javax.inject.Qualifier.

If the microprofile config @ConfigProperty annotation could add javax.inject.Qualifier from javax.inject:javax.inject:1 that would be super helpful!

This would be super easy to make the change here; I've also made a similar request to Guice library (https://github.com/google/guice/issues/1679), but I imagine that to be much harder to both implement and to adopt from all clients/libraries involved.

Emily-Jiang commented 1 year ago

@scr-oath MicroProfile has moved up to jakarta namespace. If you want to use javax namespace, you have to use the previous versions of MicroProfile config such as 2.x or prior.

Emily-Jiang commented 1 year ago

I am going to close this one based on the above comment. Please reopen if you have other concerns.