Exemplo n.º 1
0
  @RequestMapping(
      value = "/task/{taskId}",
      method = RequestMethod.GET,
      produces = "application/json")
  @ResponseBody
  public TaskRead getTaskById(@PathVariable long taskId) throws Exception {
    TaskRead task;

    if ((task = taskManager.getTaskById(taskId)) == null) {
      throw BddException.NOT_FOUND("task", "" + taskId);
    }

    return task;
  }