This repository has been archived on 2025-04-19. You can view files and clone it, but cannot push or open issues or pull requests.
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);
}
}