pull/192/head
johnniang 2019-06-07 09:29:03 +08:00
parent 9849fe65cb
commit 3dc0a4ea39
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ import java.util.Map;
* *
* @author johnniang * @author johnniang
*/ */
@RestControllerAdvice @RestControllerAdvice({"run.halo.app.controller.admin.api", "run.halo.app.controller.content.api"})
@Slf4j @Slf4j
public class ControllerExceptionHandler { public class ControllerExceptionHandler {

View File

@ -53,11 +53,11 @@ public class CommonController implements ErrorController {
if (StringUtils.startsWithIgnoreCase(throwable.getMessage(), "Could not resolve view with name '")) { if (StringUtils.startsWithIgnoreCase(throwable.getMessage(), "Could not resolve view with name '")) {
// TODO May cause unknown-reason problem // TODO May cause unknown-reason problem
// if Ftl was not found then redirect to /404 // if Ftl was not found then redirect to /404
return "redirect:/404"; return contentNotFround();
} }
} }
return statusCode == 500 ? "redirect:/500" : "redirect:/404"; return statusCode == 500 ? contentInternalError() : contentNotFround();
} }
/** /**