return new ModelAndView("/edit", model);
}
@RequestMapping("/image/{value}")
public void image(@PathVariable("value") String value, HttpServletResponse response) throws IOException {
Image image = Technology.findImage(value);
if (image != null) {
response.setContentLength(image.getBytes().length);
response.setContentType(image.getContentType());
response.getOutputStream().write(image.getBytes());
} else {
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
}
response.getOutputStream().flush();
response.getOutputStream().close();