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

jQuery clickable div with working mailto link inside -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -