spring-boot-starter-jetty 的默认响应超时是多少
What is default response timeout for spring-boot-starter-jetty
我可以知道 'spring-boot-starter-jetty' 的默认响应超时和连接超时值是多少以及如何在 Spring rest 应用程序中配置它们吗?
您可以在 ServerProperties class:
上找到默认值
看看这个class我们可以检查没有默认值:
/**
* Amount of time the connector will wait, after accepting a connection, for the
* request URI line to be presented.
*/
private Duration connectionTimeout;
在这里您可以找到默认的 Spring 引导属性值:
如果您想设置超时值,只需在 application.properties 文件中添加 属性:
例如
server.jetty.connection-idle-timeout=5000
我可以知道 'spring-boot-starter-jetty' 的默认响应超时和连接超时值是多少以及如何在 Spring rest 应用程序中配置它们吗?
您可以在 ServerProperties class:
上找到默认值看看这个class我们可以检查没有默认值:
/**
* Amount of time the connector will wait, after accepting a connection, for the
* request URI line to be presented.
*/
private Duration connectionTimeout;
在这里您可以找到默认的 Spring 引导属性值:
如果您想设置超时值,只需在 application.properties 文件中添加 属性:
例如
server.jetty.connection-idle-timeout=5000