为什么spring任务:在任务上没有配置注释驱动的异常处理程序:executor annotation

时间:2018-05-15 05:48:31

标签: java spring spring-mvc spring-boot

我有两个task:executor注释:

<task:executor id="asyncExecutor"
               pool-size="5-100"
               keep-alive="120"
               rejection-policy="CALLER_RUNS"
               queue-capacity="1000"/>

<task:executor id="otherExecutor"
               pool-size="5-20"
               keep-alive="120"
               rejection-policy="CALLER_RUNS"
               queue-capacity="100"/>
<bean id="asyncExceptionHandler" class="com.xx.xx.xx.xx.common.AsyncExceptionHandler"/>

<task:annotation-driven executor="asyncExecutor" exception-handler="asyncExceptionHandler"/>

我希望两个task:executors使用相同的exception-handler。 我该怎么办?

0 个答案:

没有答案