I am working on a java spring mvc application. I have a method in my controller that is responsible for creating the image:
@RequestMapping(value = "/view", method = RequestMethod.GET, produces = "image/jpg")
public void viewImage(HttpServletResponse response, HttpServletRequest request) throws Exception
It works great. But now I have a problem. The resulting images can have 3 formats jpg, jpeg and png. So I need some attributes producesin @RequestMapping. Is there any way to do this? For example, something like this:produces = "image/jpg, image/jpeg, image/png"
hamed source
share