use of org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory in project spring-boot by spring-projects.
the class DefaultServletWebServerFactoryCustomizerTests method customTomcatMaxHttpPostSize.
@Test
public void customTomcatMaxHttpPostSize() {
Map<String, String> map = new HashMap<>();
map.put("server.tomcat.max-http-post-size", "10000");
bindProperties(map);
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(0);
this.customizer.customize(factory);
TomcatWebServer embeddedFactory = (TomcatWebServer) factory.getWebServer();
embeddedFactory.start();
try {
assertThat(embeddedFactory.getTomcat().getConnector().getMaxPostSize()).isEqualTo(10000);
} finally {
embeddedFactory.stop();
}
}
Aggregations