Skip to content

Resources defaulting to ApplicationScoped #1371

@dansiviter

Description

@dansiviter

Quarkus Version: 0.11.0
Maven Version: 3.6.0
Java Version: 1.8.0_191

It appears on build that JAX-RS resources are defaulting to @ApplicationScope. e.g.:

@Path("v1")
@Produces(APPLICATION_JSON)
public class HelloWorldResource {

Is resulting in a message:

[INFO] [io.quarkus.arc.processor.BeanProcessor] Found unrecommended usage of private members (use package-private instead) in application beans:
	- @Inject field acme.jaxrs.v1.HelloWorldResource#jwtProvider

However, ReSTEasy states:

If a JAX-RS root resource does not define a scope explicitly, it is bound to the Request scope.

See here.

Also, there is also a question regarding "unrecommended usage of private members...in application beans": what is the rationale around this?

Moved from quarkusio/quarkus-quickstarts#86.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions