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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -