@Controller public class PhotoController extends Object
Constructor and Description |
---|
PhotoController() |
Modifier and Type | Method and Description |
---|---|
org.springframework.http.ResponseEntity<String> |
getJsonPhotos(String callback) |
org.springframework.http.ResponseEntity<byte[]> |
getPhoto(String id) |
org.springframework.http.ResponseEntity<String> |
getXmlPhotos() |
void |
setPhotoService(PhotoService photoService) |
@RequestMapping(value="/photos", params="format=json") @ResponseBody public org.springframework.http.ResponseEntity<String> getJsonPhotos(@RequestParam(required=false) String callback) throws Exception
Exception
@RequestMapping(value="/photos", params="format=xml") @ResponseBody public org.springframework.http.ResponseEntity<String> getXmlPhotos() throws Exception
Exception
@RequestMapping(value="/photos/{photoId}") public org.springframework.http.ResponseEntity<byte[]> getPhoto(@PathVariable(value="photoId") String id) throws IOException
IOException
public void setPhotoService(PhotoService photoService)
Copyright © 2014. All rights reserved.