@ControllerAdvice public class ErrorHandler { @ExceptionHandler(Exception.class) String handleException(Exception e){ return "404.html"; } }
@ControllerAdvice public class ErrorHandler { @ExceptionHandler(Exception.class) String handleException(Exception e){ return "404.html"; } }
转载于:https://www.cnblogs.com/liulihaha/p/10425626.html