Skip to content

@EnableScheduling javadoc has incomplete XML example [SPR-14145] #18717

@spring-projects-issues

Description

@spring-projects-issues

Manuel Jordan opened SPR-14145 and commented

On

Annotation Type EnableScheduling javadoc/api

Currently it contains:

<beans>
    <task:annotation-driven scheduler="taskScheduler"/>
    <task:scheduler id="taskScheduler" pool-size="42"/>
    <task:scheduled ref="myTask" method="work" fixed-rate="1000"/>
    <bean id="myTask" class="com.foo.MyTask"/>
</beans>

Must be

<beans>
    <task:annotation-driven scheduler="taskScheduler"/>
    <task:scheduler id="taskScheduler" pool-size="42"/>
    <task:scheduled-tasks scheduler="scheduler" >
             <task:scheduled ref="myTask" method="work" fixed-rate="1000"/>
    </task:scheduled-tasks>	
    <bean id="myTask" class="com.foo.MyTask"/>
</beans>

In XML the task:scheduled component must be inside of task:scheduled-tasks


Affects: 3.2.16, 4.2.3

Backported to: 3.2.17

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: documentationA documentation task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions