記錄一次spring定時任務,需要多線程執行時遇到的坑

項目中需要使用定時任務開啓多個線程處理組裝報文業務,但是在spring.xml中配置了 <task:annotation-driven executor="myexecutor" />    <task:executor id="myexecutor" pool-size="2"  />  並不起作用,依然是單線程執行,後查看spring源碼得知,需要配置scheduler,如果不配置schedu
相關文章
相關標籤/搜索