Avoid mandating how a Dependency Injection (DI) framework should interact with JAX-RS
- Dominant language
- Java
- Stars
- 400
- Forks
- 143
- PR merge metrics
- No merged PRs in 30d
Description
The specification should avoid specifying how DI frameworks should interact with JAX-RS. It is one thing for the spec to mention that values of type UriInfo should be inject in a request scope. It's another thing for it to specify that if multiple constructors match injection, the one with the most parameters should be chosen.
The former mandates **what** values need to be injected. The latter mandates **how** they must be injected. The **how** varies across DI frameworks and, as such, should be out of scope. No one in their right mind expects to be able to migrate from Spring to Guice to HK2 without changing any code, and it isn't JAX-RS's job to make such a transition portable. JAX-RS should focus on the compatibility of JAX-RS implementations, and leave DI out of scope as much as possible.
#### Affected Versions
[2.0]
Contributor guide
Assessment
This issue has not been assessed yet.