2023-06-06 20:13:56 +08:00

15 lines
431 B
Java

package com.nantian.demo.exception.handler;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import xyz.zhouxy.plusone.commons.util.RestfulResult;
// @RestControllerAdvice
public class DefaultHandler {
@ExceptionHandler(Exception.class)
public RestfulResult handle(Exception e) {
return RestfulResult.error("2233", e);
}
}