You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juneau.apache.org by "James Bognar (Jira)" <ji...@apache.org> on 2020/01/11 16:10:00 UTC
[jira] [Created] (JUNEAU-177) Allow REST methods at specific paths
to be overridden by methods in child classes.
James Bognar created JUNEAU-177:
-----------------------------------
Summary: Allow REST methods at specific paths to be overridden by methods in child classes.
Key: JUNEAU-177
URL: https://issues.apache.org/jira/browse/JUNEAU-177
Project: Juneau
Issue Type: Improvement
Components: Code
Affects Versions: 8.1.2
Reporter: James Bognar
Currently you will get an exception if you try to duplicate paths in a class.
Relax that restriction to allow you to override paths by child classes like so:
{code:java}
@Rest
public static class B1 {
@RestMethod(name=GET, path="/foo")
public String b01a() {
return "a";
}
}
@Rest
public static class B2 extends B1 {
@RestMethod(name=GET, path="/foo")
public String b02a() { // Overrides method on parent.
return "b";
}
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)