I am trying to inject a io.micronaut.runtime.http.scope.RequestScope object into my jaxrs resource. Here I am priting object to see if it creates different objects for each request. But the object created Only once, even when I sent multiple requests. Is this a known issue ? Any other way to work around this if that's the case.
@RequestScope
public class RequestScopeObjectX {
public RequestScopeObjectX() {
System.out.println("-------------------------"+this);
}
}
And in. my jaxrs resource class I am doing injecting it
@Inject
RequestScopeObjectX objectX;