init
This commit is contained in:
13
src/main/java/com/ping/study/config/GlobalException.java
Normal file
13
src/main/java/com/ping/study/config/GlobalException.java
Normal file
@@ -0,0 +1,13 @@
|
||||
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();
|
||||
return e.getMessage();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user