Skip to content

Instantly share code, notes, and snippets.

@zziuni
Created September 25, 2012 05:19
Embed
What would you like to do?
Spring controller method sample
@RequestMapping(value = "/deleteWorkingSet.do", method = RequestMethod.POST)
// @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR)
public @ResponseBody
Map<String, Object> deleteWorkingSet(String wsId) {
Map<String, Object> result = new HashMap<String, Object>();
try {
projectService.deleteWorkingSet(wsId);
result.put("success", true);
} catch (Exception e) {
logger.error("deleteWorkingSet", e);
result.put("message", e.getMessage());
result.put("success", false);
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment