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] [Closed] (JUNEAU-177) Allow REST methods at specific paths to be overridden by methods in child classes.
Date Sat, 11 Jan 2020 16:12:00 GMT

     [ https://issues.apache.org/jira/browse/JUNEAU-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James Bognar closed JUNEAU-177.
-------------------------------
    Fix Version/s: 8.1.3
       Resolution: Fixed

> 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
>            Priority: Major
>             Fix For: 8.1.3
>
>
> 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