当 wicket6.x 或 wicket7.7 中引发意外异常时,是否应该显示通用内部错误页面?


protected void init() {
getApplicationSettings().setInternalErrorPage(BnafInternalErrorPage.class);
getApplicationSettings().setPageExpiredErrorPage(BnafAccessDeniedErrorPage.class);
getApplicationSettings().setAccessDeniedPage(BnafAccessDeniedErrorPage.class);
getExceptionSettings().setInternalErrorPage(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);

在上面的代码中,我在IExceptionSettings上遇到了错误。

IExceptionSettings

在检票口 7 中删除

因此,您可以替换下面的行。

getExceptionSettings().setInternalErrorPage(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);

getExceptionSettings().setUnexpectedExceptionDisplay(ExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);

要了解更多详情,请查看此处 https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0#MigrationtoWicket7.0-AllIXyzSettingsareremovedWICKET-5410

最新更新