0
我想設置我的jms組件來使用特定的TaskExecutor
(實際上寧願使用ExecutorService
但似乎不可能)。但是,爲什麼我試圖這樣做,我得到一個錯誤。爲JMS組件設置TaskExecutor
我的春節,有以下幾點:
<bean id="jmsExecutorService" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor>....</bean>
我的路線生成器有以下幾點:
from("jms:queue:myQueue?concurrentConsumers=20&taskExecutor=jmsExecutorService")...
當我運行此我得到以下錯誤:
IllegalArgumentException: Could not find a suitable setter for property: taskExecutor
as there isn't a setter method with same type: String not a conversion possible:
No type converter available to convert from type: String to the required type
TaskExecutor with value jmsExecutorService
我有很難找到設置TaskExecutor的工作示例。我想指定一個特定的TaskExecutor,因爲我想適當地命名線程池中的線程。
感謝您的快速響應noob問題。 –