首页>代码>angular js+require+spring boot+spring mvc+mybatis实战演练demo>/angular/src/main/java/com/cn/stephen/component/MyCustomizer.java
package com.cn.stephen.component;

import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.context.embedded.ErrorPage;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;

/**
 * 服务器的相关配置
 * @author Administrator
 *
 */
@Component
public class MyCustomizer implements EmbeddedServletContainerCustomizer {

	@Override
	public void customize(ConfigurableEmbeddedServletContainer container) {
		ErrorPage error401Page = new ErrorPage(HttpStatus.UNAUTHORIZED, "/static/401.html");
		ErrorPage error404Page = new ErrorPage(HttpStatus.NOT_FOUND, "/static/404.html");
		ErrorPage error500Page = new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/static/500.html");
		container.addErrorPages(error401Page, error404Page, error500Page);
		container.setSessionTimeout(30);
		/*container.setPort(9000);
		container.setContextPath("angular");*/
	}

}
最近下载更多
WASDZZ  LV13 2023年2月3日
a1677596408  LV23 2022年7月1日
9843637  LV9 2021年12月13日
Kentucky  LV5 2021年7月16日
ssm123  LV9 2020年7月5日
cex12345  LV4 2020年6月5日
1358849392  LV21 2020年5月7日
dyt-123  LV7 2020年3月28日
pahirdin  LV12 2020年1月26日
fsheng122  LV7 2019年12月26日
最近浏览更多
飞呀飞呀飞不放  LV7 2023年8月25日
微信网友_6442588254851072  LV2 2023年4月21日
李亮  LV19 2023年3月6日
wxd1997  LV13 2022年11月4日
new_docker  LV15 2022年8月5日
谢谢谢谢谢谢你  LV6 2022年7月19日
a1677596408  LV23 2022年7月1日
fengzhou888  LV5 2022年6月16日
WASDZZ  LV13 2022年5月10日
kissnicky  LV7 2022年4月25日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友