首页>代码>基于SpringBoot开发的知识库管理系统的设计与实现>/pb-cms/src/main/java/com/puboot/common/config/ErrorPageConfig.java
package com.puboot.common.config;
import org.springframework.boot.web.server.ErrorPage;
import org.springframework.boot.web.server.ErrorPageRegistrar;
import org.springframework.boot.web.server.ErrorPageRegistry;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
/**
* 配置系统后台出错时跳转到的错误页面
*
* @author LinZhaoguan
* @version V1.0
* @date 2019年9月11日
*/
@Component
public class ErrorPageConfig implements ErrorPageRegistrar {
@Override
public void registerErrorPages(ErrorPageRegistry errorPageRegistry) {
ErrorPage e403 = new ErrorPage(HttpStatus.FORBIDDEN, "/error/403");
ErrorPage e404 = new ErrorPage(HttpStatus.NOT_FOUND, "/error/404");
ErrorPage e500 = new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/error/500");
errorPageRegistry.addErrorPages(e403, e404, e500);
}
}
最近下载更多
微信网友_7749181505556480 LV2
10月30日
xiexiaoming05 LV14
6月14日
liuqi1234 LV1
5月11日
lyosaki88 LV1
3月7日
xgs_wu LV1
2月18日
lvyga1 LV2
2024年12月18日
xianyu091012 LV5
2024年11月19日
allmy3 LV2
2024年10月30日
微信网友_7044194812350464 LV8
2024年9月13日
255921158 LV5
2024年9月11日
最近浏览更多
微信网友_7749181505556480 LV2
10月30日
a134136
9月22日
暂无贡献等级
yuyuhshbbja
9月15日
暂无贡献等级
20031030
8月7日
暂无贡献等级
微信网友_7614568776503296
7月27日
暂无贡献等级
xiexiaoming05 LV14
6月14日
潜心小白来到 LV3
6月10日
ES大兵 LV11
6月9日
zt843217 LV2
5月26日
liuqi1234 LV1
5月11日

