Browse Source

Polish @EnableScheduling Javadoc

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4515 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/merge
Chris Beams 15 years ago
parent
commit
419288562b
  1. 6
      org.springframework.context/src/main/java/org/springframework/scheduling/annotation/EnableScheduling.java

6
org.springframework.context/src/main/java/org/springframework/scheduling/annotation/EnableScheduling.java

@ -125,7 +125,9 @@ import org.springframework.scheduling.config.ScheduledTaskRegistrar; @@ -125,7 +125,9 @@ import org.springframework.scheduling.config.ScheduledTaskRegistrar;
* taskRegistrar.setScheduler(taskScheduler());
* taskRegistrar.addTriggerTask(
* new Runnable() {
* myTask().work();
* public void run() {
* myTask().work();
* }
* },
* new CustomTrigger()
* );
@ -150,7 +152,7 @@ import org.springframework.scheduling.config.ScheduledTaskRegistrar; @@ -150,7 +152,7 @@ import org.springframework.scheduling.config.ScheduledTaskRegistrar;
* <task:annotation-config scheduler="taskScheduler"/>
* <task:scheduler id="taskScheduler" pool-size="42"/>
* <task:scheduled ref="myTask" method="work" fixed-rate="1000"/>
* <bean id="myTask" class="com.foo.MyAsyncBean"/>
* <bean id="myTask" class="com.foo.MyTask"/>
* </beans>
* }</pre>
* the examples are equivalent save that in XML a <em>fixed-rate</em> period is used

Loading…
Cancel
Save