mirror of
https://github.com/chatopera/cosin.git
synced 2025-08-01 16:38:02 +08:00
Replace EmbeddedServletContainerCustomizer with WebServerFactoryCustomizer
This commit is contained in:
parent
9c857f7d06
commit
3181762e19
@ -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<TomcatServletWebServerFactory> containerCustomizer() {
|
||||
return container -> {
|
||||
ErrorPage error = new ErrorPage("/error.html");
|
||||
container.addErrorPages(error);
|
||||
|
Loading…
x
Reference in New Issue
Block a user