kkrkuldeep
kkrkuldeep

Reputation: 83

Spring MVC @PathVariable with a underscore (_) and dot (.) gets truncated

@RequestMapping(method = RequestMethod.GET, value = "/abc/{something}")

now my something is a type of String comes == ABC.HELLO_WORLD_COOL.AMAZING_GREAT

how can I achieve this thing into my @PathVariable

Upvotes: 0

Views: 327

Answers (1)

Vivek Jain
Vivek Jain

Reputation: 2864

Try this it will allow dot(.) and underscore(_).

 @RequestMapping(method = RequestMethod.GET, value = "/abc/{something:.+}")

Upvotes: 1

Related Questions