Spring线程池ThreadPoolTaskExecutor配置及图解
<bean id="tsxAlonePolicyApplytaskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"> <property name="corePoolSize" value="20" /> <property name="keepAliveSeconds" value="30" /> <property name="maxPoolSize" value="40" /> <property name="queueCapacity" value="20" /> <property name="rejectedExecutionHandler"> <bean class="java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy" /> </property> </bean>
相关文章推荐:Java线程池的原理及几类线程池的介绍