SpringBoot设置默认启动线程配置

1.springboot配置线程

1.1 springboot默认启动线程

server.port=9000
#配置编码
server.tomcat.uri-encoding=UTF-8
#最大并发数
server.tomcat.max-threads=1000 
#接受和处理的最大连接数
server.tomcat.max-connections=9
#初始化时创建的线程数
server.tomcat.min-SpareThreads=6
#可以放到处理队列中的请求数
server.tomcat.acceptCount=10
# session最大超时时间(分钟),默认为30分钟
server.session-timeout=60

1.2 接受和处理的最大连接数

 

每个线程占用的内存和cpu的:所以创建线程是有代价的

 

 

 

 

 

posted @ 2020-12-30 17:36  渴望蓝天的白鸽  阅读(2940)  评论(0)    收藏  举报