java - Jersey @DefaultValue not working with Regex defined path -
@get @path("multiply/{first: ((\\+|-)?\\d+)?}{n:/?}{second:((\\+|-)?\\d+)?}") public string multiply(@pathparam("first") int first, @defaultvalue("1") @pathparam("second") int second) throws exception { return first * second; } when request host/multiply/3 result should 3, returned 0 since second reason 0, should 1.
why default value not set properly?
i find somewhere in public email threads @defaultvalue not working @pathparam , fact should work error/bug in jersey documentation.
Comments
Post a Comment