Я новичок в сервисах RESTful и их реализации на Spring 3. Мне бы хотелось, чтобы ваше мнение о лучших практиках возврата типа, когда клиент создает новый ресурс на моем сервере.Spring 3 RESTful return on POST (create)
@RequestMapping(method = RequestMethod.POST,
value = "/organisation",
headers = "content-type=application/xml")
@ResponseStatus(HttpStatus.CREATED)
public ??? createOrganisation(@RequestBody String xml)
{
StreamSource source = new StreamSource(new StringReader(xml));
Organisation organisation = (Organisation) castorMarshaller.unmarshal(source);
// save
return ???;
}
Эта помощь поможет http://stackoverflow.com/questions/12837907/what-to-return-if-spring-mvc-controller-method-doesnt-return-value – Xiangyu