开发者

Spring @RequestMapping and trailing slash

开发者 https://www.devze.com 2022-12-29 18:27 出处:网络
I am trying to map a method in a Controller using the annotation with URI template: @RequestMapping(value=\"/select/{customerNumber}/{resource}\", method=RequestMethod.GET)

I am trying to map a method in a Controller using the annotation with URI template:

@RequestMapping(value="/select/{customerNumber}/{resource}", method=RequestMethod.GET)

It appears that this does not get mapped if there is a trailing slash at the end of "resource".

Update: Using Spring 3.0.2 release

Update 2: @RequestMap开发者_如何学编程ping seems to behave differently for URI templates vs where I don't use template. For non-template, it does not work if I have a trailing slash. But for templates it does not work if I don't have a trailing slash. Very strange!


This is fixed in 3.0.3 release. SPR-7064

0

精彩评论

暂无评论...
验证码 换一张
取 消