java - Jersey 2.*. Custom InjectionResolver and "A HTTP GET method ... should not consume any entity" -


i have followed michal's guide answer question [1] on implementing custom annotation injecting arbitrary things resource methods. (gist) [2] contains minimalistic testbed adapted jersey-quickstart-grizzly2 archetype. refer in following text.

i encountered few problems:

  1. my resolver parametrized type (or @ least make things more cleaner, in opinion) , can not bind in binder way michal suggests.

    // instead of suggested: // bind(myinjectionresolver.class).to(new typeliteral<injectionresolver<myannotation>>() {}).in(singleton.class); // do: bind(myinjectionresolverobject).to(new typeliteral<injectionresolver<myannotation>>() {}); 
  2. when use myannotation in resource method, following warning on server start-up (but server still starts):

    warning: following warnings have been detected: warning: http method, public java.lang.string com.example.myresource.get02(java.lang.integer,java.lang.string), should not consume entity. 
  3. when request resource (curl -x http://localhost:8080/myresource/01/aa), 02: value = aa; providedvalue = null instead of expected 02: value = aa; providedvalue = 123.

  4. the myresolver.resolve method never executed (but mybinder.configure executed).

  5. (this not concern testbed application, encounter problem in more complicated code: resource method never executed , server responds 500 no content map object due end of input)

any ideas might doing wrong?


Comments

Popular posts from this blog

design - Custom Styling Qt Quick Controls -

Unable to remove the www from url on https using .htaccess -