-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement
Description
Hello,
I'm wondering, if it is possible to have some basic configuration for embedded Jetty in application.properties. Right now to customize thread pool and idle timeout, we're creating bean, which is not convenient...
@Bean
public JettyEmbeddedServletContainerFactory jettyEmbeddedServletContainerFactory() {
final JettyEmbeddedServletContainerFactory factory = new JettyEmbeddedServletContainerFactory(serverProperties.getPort());
factory.addServerCustomizers((Server server) -> {
final QueuedThreadPool threadPool = server.getBean(QueuedThreadPool.class);
threadPool.setMinThreads(appProperties.getMinThreads());
threadPool.setMaxThreads(appProperties.getMaxThreads());
threadPool.setIdleTimeout(appProperties.getIdleTimeout());
});
return factory;
}
Could we have something similar like for tomcat and undertow. F.e.
server.jetty.max-threads
server.jetty.min-threads
server.jetty.idle-timeout
Or make it more generic. I'm pretty sure each servlet container has ability to configure such properties.
Thanks!
stevenschlansker, sumrise, cemo, micheljung, adamzr and 15 more
Metadata
Metadata
Assignees
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement