From 3181762e1971553298c885c7f0d50ff526ccfc59 Mon Sep 17 00:00:00 2001 From: "dengchao@xgtl" <2325690622@qq.com> Date: Wed, 15 Apr 2020 16:29:32 +0800 Subject: [PATCH] Replace EmbeddedServletContainerCustomizer with WebServerFactoryCustomizer --- .../app/src/main/java/com/chatopera/cc/Application.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contact-center/app/src/main/java/com/chatopera/cc/Application.java b/contact-center/app/src/main/java/com/chatopera/cc/Application.java index 280e50d5..b9b5d76b 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/Application.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/Application.java @@ -29,8 +29,9 @@ import org.springframework.boot.Banner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer; -import org.springframework.boot.web.servlet.ErrorPage; +import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; +import org.springframework.boot.web.server.ErrorPage; +import org.springframework.boot.web.server.WebServerFactoryCustomizer; import org.springframework.boot.web.servlet.MultipartConfigFactory; import org.springframework.context.annotation.Bean; import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories; @@ -128,7 +129,7 @@ public class Application { } @Bean - public EmbeddedServletContainerCustomizer containerCustomizer() { + public WebServerFactoryCustomizer containerCustomizer() { return container -> { ErrorPage error = new ErrorPage("/error.html"); container.addErrorPages(error);