15 lines
407 B
Java
15 lines
407 B
Java
package com.ping.study.config;
|
|
|
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
|
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
|
|
|
@RestControllerAdvice
|
|
public class GlobalException {
|
|
@ExceptionHandler(Exception.class)
|
|
public Object handleException(Exception e) {
|
|
//e.printStackTrace();
|
|
e.printStackTrace();
|
|
return e.getMessage();
|
|
}
|
|
}
|