java - Jersey: cannot inject custom parameter annotation -
I created a custom annotation to inject the query parameter into sections generated by my JACB:
Public Finish QueriesProviderProviderProviderAvTualFinderProvider {@ Inject private service locator locator; @ Sittington Static Final Class Injection Rollover ParamInjectionResolver Expanded & lt; Projects Aqua Para & gt; {Public Injection Resolver () {Super (ProjectsCamparmValifenerProver class); }} Private Finite Static Class Projects Paramval Factor Abstractantentaruse Value Value Factory & lt; Projects & gt; {Private Final Servers Locator; Private last parameter parameter; Pvt ProjectsclideParamValiner (ServiceLicator Locator, Parameter Parameter) {this.locator = locator; this. Parameter = parameter; } @ Override Public Projectsclasification () {// Tudo Auto-Generated Method Stub Returns New Projects (); }} [@ Injected Public Projektsclaveparamvalufainrprowaider (Maltivillepirmetraktektrakpraivr MPP, Srvislaoketr locator Source] compatible source) {super (MPP, Europe, consistent source); } @ Override Public Factory & lt ;? & Gt; CreateValueFactory (parameter parameter) {class
binder added:
public class Projektskwadeepiarmbiinder Aebstbinder {@Override protected void configure () {bind (ProjectsQueryParamValueFactoryProvider.class) enhances .to (ValueFactoryProvider.class) .in (singleton. class ); Bind (ProjectsclapValueFinderProver.EngjectorsSolar.class (New type literal; Injection Resoler & Projects; Paras >> Paragraph.S. Class);}}
and is registered in my app:
Public MyApplication () {packages ("org.glassfish.jersey.server. Unfortunately, HK2 gives me: org.glassfish ();
.hk2.api.UnsatisfiedDependencyException: An object for injection into injection Plbd was not (type required = parameter $ source ;; Parents = Projektsclapavlfinetprowaider, Kwalifiars = {}), status = 2, optional = false, self = false, unqualified = zero, 4924537) on org.jvnet.hk2.internal.ThreeThirtyResolver.resolve (three Tihairolvr. Java: 74)
web.xml
& lt; Servlet & gt; & Lt; Servlet-name & gt; Jaxrs-servlet & lt; / Servlet-name & gt; & Lt; Servlet category & gt; Org.glassfish.jersey.servlet.ServletContainer & lt; / Servlet category & gt; & Lt; Init-param & gt; & Lt; Ultimate Name & gt; Javax.ws.rs.Application & lt; / Lastname & gt; & Lt; Ultimate Price & gt; Com.MyApplication & lt; / Super-valued & gt; & Lt; / Init-param & gt; & Lt; Load-On-Startup & gt; 2 & lt; / Load-on-startup & gt; & Lt; / Servlet & gt; & Lt; Servlet-mapping & gt; & Lt; Servlet-name & gt; Jaxrs-servlet & lt; / Servlet-name & gt; & Lt; URL pattern & gt; / Left / * & lt; / URL pattern & gt; & Lt; / Servlet-mapping & gt;
I have read the source code of jersey-proficient annotations, all of which appear as my code. Where's the dam?
I did not even get any benefit.
Comments
Post a Comment