eclipse-ee4j / eclipse-ee4j/jersey

Failed to Inject ResourceContext and UriInfo by @Inject

Open
#5,100 21 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

Glassfish 7.0.0-M7, Java 17, Windows 10.

As described in Jakarta EE 10 spec, the Jaxrs 3.1 should align to CDI and support to inject Jaxrs resource by general @Inject annotation.

I have tried to use `@Inject` instead of Jaxrs `@Context`, all failed.

```java
@Path("todos")
@RequestScoped
public class TodoResources {

//@Inject
@Context
ResourceContext resourceContext;

//@Inject
@Context
UriInfo uriInfo;

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.