@@ -0,0 +1,1339 @@
+package com.aemreunal.controller.project;%0A%0Aimport net.minidev.json.JSONObject;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0Aimport org.springframework.http.HttpStatus;%0Aimport org.springframework.http.ResponseEntity;%0Aimport org.springframework.web.bind.annotation.ControllerAdvice;%0Aimport org.springframework.web.bind.annotation.ExceptionHandler;%0Aimport com.aemreunal.exception.project.ProjectNotFoundException;%0A%0A/*%0A ***************************%0A * Copyright (c) 2014      *%0A *                         *%0A * This code belongs to:   *%0A *                         *%0A * @author Ahmet Emre %C3%9Cnal *%0A * S001974                 *%0A *                         *%0A * aemreunal@gmail.com     *%0A * emre.unal@ozu.edu.tr    *%0A *                         *%0A * aemreunal.com           *%0A ***************************%0A */%0A%0A@ControllerAdvice%0Apublic class ProjectControllerAdvice %7B%0A    @ExceptionHandler(ProjectNotFoundException.class)%0A    public ResponseEntity%3CJSONObject%3E projectNotFoundExceptionHandler(ProjectNotFoundException ex) %7B%0A        Map%3CString, String%3E errorMessage = new HashMap%3C%3E(2);%0A        errorMessage.put(%22reason%22, %22project%22);%0A        errorMessage.put(%22error%22, ex.getLocalizedMessage());%0A        JSONObject responseBody = new JSONObject(errorMessage);%0A        return new ResponseEntity%3CJSONObject%3E(responseBody, HttpStatus.BAD_REQUEST);%0A    %7D%0A%7D%0A

Add ProjectController advice