0
私はスケジューラと並行して多くのスケジュールされたタスクを実行しようとしますが、1つだけ起動します。 spring-scheduler.xmlの私のbean設定Spring、Java - 多くのスケジュールされたタスクを並列に実行する
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task-3.2.xsd">
<task:executor id="executor" pool-size="5"/>
<task:scheduler id="scheduler" pool-size="10"/>
<bean id="UpdateScheduler" class="org.ws.scheduled.UpdateScheduler" />
<bean id="PatchData" class="org.ws.scheduled.PatchData" />
<task:scheduled-tasks>
<task:scheduled ref="UpdateScheduler" method="start" fixed-delay="1000" />
<task:scheduled ref="PatchData" method="start" fixed-delay="5000" />
</task:scheduled-tasks>
<task:annotation-driven scheduler="scheduler" executor="executor" />
</beans>
ここから正常に動作していますスケジューラーとエグゼキューター。 –
あなたは例を書いてください! – prilia
スケジューラとエグゼキュータを ''に接続する必要があります。現在、実行する別のスケジューラ/エグゼキュータを作成します。 –