春季最大(客户端请求)线程池大小

我正在开发应用程序服务器使用春季启动应用程序,但现在我想知道什么是默认的最大(客户端请求)线程池大小在春季,我如何定制该值?

137085 次浏览

Assuming that you're using embedded Tomcat, Spring Boot uses the server.tomcat.max-threads property to control the size of the client request thread pool. Its default value is zero which leaves Tomcat to use its default of 200.

To customise the size of this thread pool you should specify a non-zero value for the server.tomcat.max-threads property in your application.properties or application.yml file.

As server.tomcat.max-threads is deprecated since Springboot 2.3, now use server.tomcat.threads.max in your Spring application.properties. Default is 200.