java - Parent/Child resource classes - annotations don't work in parent class -
i don't have specific examples in front of me right now, i've had issue in past.
when have resource extends class , utilizes annotations, can base class have annotations read if they're part of child class? i've tried in scenarios , doesn't ever seem work. there way make possible? scope issue no @path
being defined base class?
@path("/workflow") @consumes({mediatype.application_json}) @produces({mediatype.application_json}) public class workflowresource extends baseworkflowresource { @get @path("/getallactive") public collection<workflowentity> getactive () { return myclass.getallactive(); } } //this call won't available public class baseworkflowresource { @get @path("/getmystring") public string getactivestring () { return "my string"; } }
this method
public collection<workflowentity> getactive()
will override method
public string getactive()
this not matter of jax-rs of plain java. both methods have same signature (name, parameters).
try using different method signatures in parent , child class.
Comments
Post a Comment