use of org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory in project spring-boot by spring-projects.
the class DefaultServletWebServerFactoryCustomizerTests method tomcatAccessLogFileDateFormatByDefault.
@Test
public void tomcatAccessLogFileDateFormatByDefault() {
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
Map<String, String> map = new HashMap<String, String>();
map.put("server.tomcat.accesslog.enabled", "true");
bindProperties(map);
this.customizer.customize(factory);
assertThat(((AccessLogValve) factory.getEngineValves().iterator().next()).getFileDateFormat()).isEqualTo(".yyyy-MM-dd");
}
use of org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory in project spring-boot by spring-projects.
the class DefaultServletWebServerFactoryCustomizerTests method testCustomTomcatTldSkip.
private void testCustomTomcatTldSkip(String... expectedJars) {
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
this.customizer.customize(factory);
assertThat(factory.getTldSkipPatterns()).contains(expectedJars);
assertThat(factory.getTldSkipPatterns()).contains("junit-*.jar", "spring-boot-*.jar");
}
use of org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory in project spring-boot by spring-projects.
the class DefaultServletWebServerFactoryCustomizerTests method customTomcatBackgroundProcessorDelay.
@Test
public void customTomcatBackgroundProcessorDelay() throws Exception {
Map<String, String> map = new HashMap<>();
map.put("server.tomcat.background-processor-delay", "5");
bindProperties(map);
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
this.customizer.customize(factory);
assertThat(((TomcatWebServer) factory.getWebServer()).getTomcat().getEngine().getBackgroundProcessorDelay()).isEqualTo(5);
}
use of org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory in project spring-boot by spring-projects.
the class DefaultServletWebServerFactoryCustomizerTests method tomcatAccessLogIsBufferedByDefault.
@Test
public void tomcatAccessLogIsBufferedByDefault() {
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
Map<String, String> map = new HashMap<>();
map.put("server.tomcat.accesslog.enabled", "true");
bindProperties(map);
this.customizer.customize(factory);
assertThat(((AccessLogValve) factory.getEngineValves().iterator().next()).isBuffered()).isTrue();
}
use of org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory in project spring-boot by spring-projects.
the class DefaultServletWebServerFactoryCustomizerTests method defaultTomcatBackgroundProcessorDelay.
@Test
public void defaultTomcatBackgroundProcessorDelay() throws Exception {
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
this.customizer.customize(factory);
assertThat(((TomcatWebServer) factory.getWebServer()).getTomcat().getEngine().getBackgroundProcessorDelay()).isEqualTo(30);
}
Aggregations