package com.hello.controller;

import com.hello.exception.AccessLimitException;
import com.hello.util.RespUtil;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExceptionController {
    @ExceptionHandler(value = AccessLimitException.class)
    public Object accessLimitExceptionHandler(AccessLimitException e) {
        return RespUtil.resp(-100, e.getMessage());
    }

    @ExceptionHandler(value = Exception.class)
    public Object exceptionHandler(Exception e) {
        return RespUtil.resp(-1, e.getMessage());
    }
}

@@ -136,44 +136,151 @@
 ork.
-web.bind.annotation.ExceptionHandler
+http.HttpStatus;%0Aimport org.springframework.web.bind.annotation.ExceptionHandler;%0Aimport org.springframework.web.bind.annotation.ResponseStatus
 ;%0Aim
@@ -404,16 +404,66 @@
 oller %7B%0A
+    @ResponseStatus(HttpStatus.TOO_MANY_REQUESTS)%0A
     @Exc
@@ -643,16 +643,70 @@
 %0A    %7D%0A%0A
+    @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)%0A
     @Exc

set response status