File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/java/com/ittovative/otpservice/exception Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 88import org .springframework .http .HttpStatus ;
99import org .springframework .validation .FieldError ;
1010import org .springframework .web .bind .MethodArgumentNotValidException ;
11- import org .springframework .web .bind .annotation .ControllerAdvice ;
1211import org .springframework .web .bind .annotation .ExceptionHandler ;
12+ import org .springframework .web .bind .annotation .RestControllerAdvice ;
1313
1414import java .util .HashMap ;
1515import java .util .Map ;
1616import java .util .NoSuchElementException ;
1717
18- @ ControllerAdvice
18+ @ RestControllerAdvice
1919public class GeneralExceptionHandler {
2020 /**
2121 * Handle validation exceptions response entity.
@@ -24,7 +24,7 @@ public class GeneralExceptionHandler {
2424 * @return the response entity
2525 */
2626 @ ExceptionHandler (MethodArgumentNotValidException .class )
27- public APIResponse <Map <String , String >> handleValidationExceptions (
27+ APIResponse <Map <String , String >> handleValidationExceptions (
2828 MethodArgumentNotValidException exception ) {
2929
3030 Map <String , String > errors = new HashMap <>();
You can’t perform that action at this time.
0 commit comments