mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-28 13:09:09 +00:00
Polish "Use Duration for ServerProperties.Jetty.idleTimeout"
See gh-18206
This commit is contained in:
+2
-3
@@ -86,9 +86,8 @@ public class JettyWebServerFactoryCustomizer
|
||||
.to((maxThreads) -> customizeThreadPool(factory, (threadPool) -> threadPool.setMaxThreads(maxThreads)));
|
||||
propertyMapper.from(jettyProperties::getMinThreads).when(this::isPositive)
|
||||
.to((minThreads) -> customizeThreadPool(factory, (threadPool) -> threadPool.setMinThreads(minThreads)));
|
||||
propertyMapper.from(jettyProperties::getIdleTimeout).whenNonNull()
|
||||
.to((idleTimeout) -> customizeThreadPool(factory,
|
||||
(threadPool) -> threadPool.setIdleTimeout((int) idleTimeout.toMillis())));
|
||||
propertyMapper.from(jettyProperties::getIdleTimeout).whenNonNull().asInt(Duration::toMillis).to(
|
||||
(idleTimeout) -> customizeThreadPool(factory, (threadPool) -> threadPool.setIdleTimeout(idleTimeout)));
|
||||
propertyMapper.from(properties::getConnectionTimeout).whenNonNull()
|
||||
.to((connectionTimeout) -> customizeConnectionTimeout(factory, connectionTimeout));
|
||||
propertyMapper.from(jettyProperties::getAccesslog).when(ServerProperties.Jetty.Accesslog::isEnabled)
|
||||
|
||||
Reference in New Issue
Block a user