Skip to content

Instantly share code, notes, and snippets.

Created September 25, 2012 05:19
What would you like to do?
Spring controller method sample
@RequestMapping(value = "/", 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 {
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