我建立一個春天的REST類型的服務和我有一個基於給定的郵政編碼檢索位置目標以下方法:的方法類型的彈簧安置最佳實踐
@RequestMapping(value = "/placeByZip", method = RequestMethod.GET)
public Place getPlaceByZipcode(@RequestParam(value="zipcode") String zipcode) {
Place place = placeService.placeByZip(zipcode);
return place;
}
它是最好的做法有返回類型「地方」的?我想這對於錯誤處理很困難?