rtrh-event.xml 1.2 KB

1234567891011121314151617181920212223242526
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
  4. xmlns:context="http://www.springframework.org/schema/context"
  5. xsi:schemaLocation="
  6. http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
  7. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
  8. <bean id="EventManager" class="com.rtrh.event.DefaultEventManager">
  9. <property name="eventTaskExecutor">
  10. <!-- 配置线程池 -->
  11. <bean class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
  12. <!-- 线程池维护线程的最少数量 -->
  13. <property name="corePoolSize" value="100" />
  14. <!-- 线程池维护线程所允许的空闲时间 -->
  15. <property name="keepAliveSeconds" value="30000" />
  16. <!-- 线程池维护线程的最大数量 -->
  17. <property name="maxPoolSize" value="1000" />
  18. <!-- 线程池所使用的缓冲队列 -->
  19. <property name="queueCapacity" value="200" />
  20. </bean>
  21. </property>
  22. </bean>
  23. </beans>