Skip to content

Instantly share code, notes, and snippets.

@zziuni
Created September 25, 2012 05:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zziuni/3780144 to your computer and use it in GitHub Desktop.
Save zziuni/3780144 to your computer and use it in GitHub Desktop.
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