|
|
|
@ -5,6 +5,8 @@ import com.supervision.common.enums.ResultStatusEnum;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 统一返回
|
|
|
|
@ -14,7 +16,8 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
|
|
|
|
|
*/
|
|
|
|
|
@Slf4j
|
|
|
|
|
@Configuration
|
|
|
|
|
public class ExceptionResponseConfig {
|
|
|
|
|
@RestControllerAdvice(annotations = RestController.class, basePackages = {"com.supervision.**.controller"})
|
|
|
|
|
public class ExceptionHandlerConfig {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 添加手动校验参数的异常处理
|