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

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

Closed
2 of 4 tasks
scr-oath opened this issue Apr 15, 2023 · 2 comments
Closed
2 of 4 tasks
Labels
use case 💡 An issue which illustrates a desired use case for the specification

Comments

@scr-oath
Copy link

Description

As a:

  • Application user/user of the configuration itself
  • API user (application developer)
  • SPI user (container or runtime developer)
  • Specification implementer

...I need to be able to:

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

...which enables me to:

  • Create libraries that declare the required configs and defaults without providing guice modules for them
  • Run (SE) applications that are configured with Guice by using the SmallRye Config implementation and reflection to create Guice bindings on the fly.
  • Use default or write new Config Sources to integrate with other configuration file readers (typesafe.Config, internally developed Configs, etc)

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 (google/guice#1679), but I imagine that to be much harder to both implement and to adopt from all clients/libraries involved.

@scr-oath scr-oath added the use case 💡 An issue which illustrates a desired use case for the specification label Apr 15, 2023
@scr-oath scr-oath changed the title Would like to support integration with Guice for SE systems: Add javax.inject.Qualifier to ConfigProperty Support integration with Guice for SE systems: Add javax.inject.Qualifier to ConfigProperty Apr 15, 2023
@Emily-Jiang
Copy link
Member

@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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
use case 💡 An issue which illustrates a desired use case for the specification
Projects
None yet
Development

No branches or pull requests

2 participants