Init Commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.realtime.protection.configuration.exception;
|
||||
|
||||
import com.realtime.protection.configuration.response.ResponseResult;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
@RestControllerAdvice
|
||||
public class GlobalExceptionHandler {
|
||||
|
||||
@ExceptionHandler
|
||||
public ResponseResult handleGlobalException(Exception e) {
|
||||
|
||||
|
||||
|
||||
|
||||
return ResponseResult.error().setMessage(e.getMessage());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user