How to inject the JAX-RS resources instance using interfaces

Solution Verified - Updated -


  • How to inject the JAX-RS resources using interfaces?
  • Executing the following code will throw javax.enterprise.inject.UnsatisfiedResolutionException. Is there a workaround for this issue?
public interface Greeting {
    public String hello();

public class GreetingResource implements Greeting {

    InjectorService injectorService;

    public String hello() {
        return "hello";

public class InjectorService {
    Instance<Greeting> greeting;

    public void test() {
        // Runtime error:
        // javax.enterprise.inject.UnsatisfiedResolutionException:
        // No bean found for required type [interface org.acme.quickstart.Greeting] and qualifiers [[@javax.enterprise.inject.Default()]]


  • Red Hat Build of Quarkus (RHBQ)
    • 1.7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content