use of com.hry.spring.mvc.exceptionhandling.support.ExceptionJSONInfo in project spring_boot by hryou0922.
the class GlobalExceptionHandler method handleEmployeeNotFoundException.
@ExceptionHandler(EmployeeExJsonException.class)
@ResponseBody
public ExceptionJSONInfo handleEmployeeNotFoundException(HttpServletRequest request, Exception ex) {
ExceptionJSONInfo response = new ExceptionJSONInfo();
response.setUrl(request.getRequestURL().toString());
response.setMessage(ex.getMessage());
return response;
}
Aggregations