首页>代码>基于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); } }
最近下载更多
最代码-宋家辉 LV61
4月25日
011026 LV1
4月17日
wanglinddad LV55
4月8日
admin_z LV22
2月4日
kkkllll LV2
1月23日
帅潇潇 LV12
1月2日
lilong007 LV20
2023年12月30日
wangyh1 LV2
2023年11月15日
18251979839 LV1
2023年11月1日
ssh123 LV10
2023年10月28日
最近浏览更多
njzc0232
5月31日
暂无贡献等级
f22m1a2b2 LV17
5月31日
叉烧君 LV3
5月24日
heweimin LV12
5月20日
港港hhhhhh LV1
5月20日
微信网友_6991509473660928
5月13日
暂无贡献等级
李俊雄 LV3
5月8日
飃go with wind
5月7日
暂无贡献等级
18699449369 LV2
5月5日
kenhomeliu LV29
4月30日