You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: defaultValue can be set to anything you like. Even setting it to "" (blank) is not working.
Run application and navigate to http://127.0.0.1:9000/test/
Notice that you get error 404 not found and nothing is being printed in console, instead of getting defaulted to http://127.0.0.1:9000/test/myDefaultParam. If you try to access http://127.0.0.1:9000/test/whatever you will get to the specified page and whatever, in this case, will be printed to console.
Expected behavior:
One should get directed to the path with the specified defaultValue when nothing else is specified.
The text was updated successfully, but these errors were encountered:
agan-tv2
changed the title
defaultValue for annotation @PathParam does not seem to be working
[BUG]: defaultValue for annotation @PathParam does not seem to be working
Jul 5, 2022
1.8
): 11.0.142.1.2.RELEASE
): 2.1.2.RELEASEDescribe the bug
defaultValue
for annotation@PathParam
does not seem to be working.Current behavior:
Path with parameter that has a default value returns 404 not found.
To Reproduce
Steps to reproduce the behavior:
@GET(value = "/test/:param")
public void test(@PathParam(defaultValue = "myDefaultParam") String param) {
System.out.println(param);
}
Note:
defaultValue
can be set to anything you like. Even setting it to "" (blank) is not working.http://127.0.0.1:9000/test/
http://127.0.0.1:9000/test/myDefaultParam
. If you try to accesshttp://127.0.0.1:9000/test/whatever
you will get to the specified page andwhatever
, in this case, will be printed to console.Expected behavior:
One should get directed to the path with the specified
defaultValue
when nothing else is specified.The text was updated successfully, but these errors were encountered: