org.springframework.boot.web.embedded.tomcat.ConfigurableTomcatWebServerFactory Java Examples
The following examples show how to use
org.springframework.boot.web.embedded.tomcat.ConfigurableTomcatWebServerFactory.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MvcConfiguration.java From tensorboot with Apache License 2.0 | 5 votes |
@Bean public ConfigurableTomcatWebServerFactory servletContainer() { return new TomcatServletWebServerFactory() { @Override protected void postProcessContext(Context context) { StandardRoot standardRoot = new StandardRoot(context); standardRoot.setCacheMaxSize(TOMCAT_RESOURCES_CACHE_SIZE); context.setResources(standardRoot); log.info(String.format("New cache size (KB): %d", context.getResources().getCacheMaxSize())); } }; }
Example #2
Source File: TomcatLogbackAccessInstaller.java From logback-access-spring-boot-starter with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected void installLogbackAccess(ConfigurableTomcatWebServerFactory container) { LogbackAccessTomcatValve valve = new LogbackAccessTomcatValve( logbackAccessProperties, environment, applicationEventPublisher); container.addEngineValves(valve); log.debug("Installed Logback-access: container=[{}]", container); }
Example #3
Source File: CrnkTomcatAutoConfiguration.java From crnk-framework with Apache License 2.0 | 4 votes |
@Override public void customize(ConfigurableTomcatWebServerFactory factory) { factory.addConnectorCustomizers(new CrnkTomcatCustomizer()); }
Example #4
Source File: LealoneTomcatServletWebServerFactoryCustomizer.java From Lealone-Plugins with Apache License 2.0 | 4 votes |
private void customizeRedirectContextRoot(ConfigurableTomcatWebServerFactory factory, boolean redirectContextRoot) { factory.addContextCustomizers((context) -> context.setMapperContextRootRedirectEnabled(redirectContextRoot)); }
Example #5
Source File: LealoneTomcatServletWebServerFactoryCustomizer.java From Lealone-Plugins with Apache License 2.0 | 4 votes |
private void customizeUseRelativeRedirects(ConfigurableTomcatWebServerFactory factory, boolean useRelativeRedirects) { factory.addContextCustomizers((context) -> context.setUseRelativeRedirects(useRelativeRedirects)); }