I have a custom context:
public class MyContext {
public String doSomething() {...}
}
I have created a context resolver:
@Provider
public class MyContextResolver implements ContextResolver<MyContext> {
public MyContext getContext(Class<?> type) {
return new MyContext();
}
}
Now in the resource I try to inject it:
@Path("/")
public class MyResource {
@Context MyContext context;
}
And I get the following error:
SEVERE: Missing dependency for field: com.something.MyContext com.something.MyResource.context
The same code works fine with Apache Wink 1.1.3, but fails with Jersey 1.10.
Any ideas will be appreciated.