Skip to content

Commit 9e6ae6d

Browse files
authored
Merge pull request lukas-krecan#17 from clamey/master
Clear up Spring XML example
2 parents b1a2497 + 4e752cf commit 9e6ae6d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,11 @@ By default, ephemeral nodes for locks will be created under `/shedlock` node.
217217
If you are using Spring XML config, use this configuration
218218

219219
```xml
220+
<!-- lock provider of your choice (jdbc/zookeeper/mongo/whatever) -->
221+
<bean id="lockProvider" class="net.javacrumbs.shedlock.provider.jdbctemplate.JdbcTemplateLockProvider">
222+
<constructor-arg ref="dataSource"/>
223+
</bean>
224+
220225
<!-- Wrap the original scheduler -->
221226
<bean id="scheduler" class="net.javacrumbs.shedlock.spring.SpringLockableTaskSchedulerFactory" factory-method="newLockableTaskScheduler">
222227
<constructor-arg>
@@ -227,7 +232,7 @@ If you are using Spring XML config, use this configuration
227232
</bean>
228233

229234

230-
<!-- Your task(s) without change -->
235+
<!-- Your task(s) without change (or annotated with @Scheduled)-->
231236
<task:scheduled-tasks scheduler="scheduler">
232237
<task:scheduled ref="task" method="run" fixed-delay="1" fixed-rate="1"/>
233238
</task:scheduled-tasks>

0 commit comments

Comments
 (0)