spring mvc uri with regular expression -
having following pattern
public static final string url_tools_image_resize_box_with_name = "/tools-box-{width:[0-9]+}-{height:[0-9]+}-{image:[0-9]{8}}/{imagename:.+}";
which leads to
@requestmapping(value = url_tools_image_resize_box_with_name, method = requestmethod.get, produces = mediatype.image_jpeg_value) public @responsebody responseentity<byte[]> resize_img_box(httpservletrequest req, @pathvariable("image") string image, @pathvariable("imagename") string imagename, @pathvariable("width") int width, @pathvariable("height") int height ) { .......
it works fine with
/tools-box-300-300-00000439/ime.jpg
and wont (leads 404 )
/tools-box-300-300-00000439/ime.png /tools-box-300-300-00000439/ime.gif
it seems .png/.gif
means spring mvc. provide detail information this?
it was
produces = mediatype.image_jpeg_value
Comments
Post a Comment