+ * [Spring Boot 3.2.0] 404 Not Found behavior #38733
+ *
+ * @param exception
+ * @return R
+ */
+ @ExceptionHandler({NoResourceFoundException.class})
+ @ResponseStatus(HttpStatus.NOT_FOUND)
+ public R bindExceptionHandler(NoResourceFoundException exception) {
+ log.debug("请求路径 404 {}", exception.getMessage());
+ return R.failed(exception.getMessage());
+ }
- /**
- * validation Exception (以form-data形式传参)
- * @param exception
- * @return R
- */
- @ExceptionHandler({ BindException.class })
- @ResponseStatus(HttpStatus.BAD_REQUEST)
- public R bindExceptionHandler(BindException exception) {
- List