juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Bognar (Jira)" <j...@apache.org>
Subject [jira] [Created] (JUNEAU-177) Allow REST methods at specific paths to be overridden by methods in child classes.
Date Sat, 11 Jan 2020 16:10:00 GMT
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)

Mime
View raw message