51.6. sample
60초마다 이벤트를 생성하는 경로를 설정하려면 다음을 수행합니다.
from("timer://foo?fixedRate=true&period=60000").to("bean:myBean?method=someMethodName");
from("timer://foo?fixedRate=true&period=60000").to("bean:myBean?method=someMethodName");
위의 경로는 이벤트를 생성한 다음 레지스트리의 myBean
이라는 빈에서 someMethodName
메서드를 호출합니다.
Spring DSL의 경로:
<route> <from uri="timer://foo?fixedRate=true&period=60000"/> <to uri="bean:myBean?method=someMethodName"/> </route>
<route>
<from uri="timer://foo?fixedRate=true&period=60000"/>
<to uri="bean:myBean?method=someMethodName"/>
</route>