java - Spring MVC 3 RequestMapping with regular expresssion quantifiers -


the method below fails "patternsyntaxexception: unclosed counted closure near index ... "

@requestmapping(value ="/{id:[0-9|a-z]{15}}") public view view(@pathvariable final string id) {   ... } 

looks pattern matcher trimming off the string , losing last }.

does know work around bug? i'm having drop qualifier "/{id:[0-9|a-z]+}" - frankly suck!

i don't think there workarounds case except manual validation. after all, {name:regexp} syntax introduced solving ambiguities between mappings rather validation.

@valid on @pathvariables solution, it's promised in spring 3.1 (spr-6380).

also feel free report bug in spring jira, although don't expect them fix since path variable handling code mess.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -