@@ -0,0 +1,1319 @@
+package com.aemreunal.controller.beacon;%0A%0A%0Aimport net.minidev.json.JSONObject;%0A%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.beacon.BeaconNotFoundException;%0Aimport com.aemreunal.helper.JsonBuilder;%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 BeaconControllerAdvice %7B%0A    @ExceptionHandler(BeaconNotFoundException.class)%0A    public ResponseEntity%3CJSONObject%3E beaconNotFoundExceptionHandler(BeaconNotFoundException ex) %7B%0A        JSONObject responseBody = new JsonBuilder().add(%22reason%22, %22beacon%22)%0A                                                   .add(%22error%22, ex.getLocalizedMessage())%0A                                                   .build();%0A        return new ResponseEntity%3CJSONObject%3E(responseBody, HttpStatus.NOT_FOUND);%0A    %7D%0A%7D%0A

Add BeaconControllerAdvice