|
|
@@ -28,7 +28,7 @@ public class ExceptionHandlerAdvice {
|
|
|
*/
|
|
|
@ExceptionHandler(RuntimeException.class)
|
|
|
public ResponseEntity<ModelMap> handleRuntimeException(RuntimeException ex) {
|
|
|
- logger.error("RuntimeException", ex);
|
|
|
+ logger.warn("{}: {}", ex.getClass().getName(), ex.getMessage());
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
headers.add("Content-Type", "application/json; charset=utf-8");
|
|
|
return new ResponseEntity<ModelMap>(error(ex.getMessage()), headers, HttpStatus.OK);
|
|
|
@@ -42,7 +42,7 @@ public class ExceptionHandlerAdvice {
|
|
|
*/
|
|
|
@ExceptionHandler(VisibleError.class)
|
|
|
public ResponseEntity<ModelMap> handleVisibleError(VisibleError ex) {
|
|
|
- logger.warn("VisibleError", ex.getMessage());
|
|
|
+ logger.warn("{}: {}", ex.getClass().getName(), ex.getMessage());
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
headers.add("Content-Type", "application/json; charset=utf-8");
|
|
|
return new ResponseEntity<ModelMap>(error(ex.getMessage()), headers, HttpStatus.OK);
|