Skip to content

Commit 26fc468

Browse files
acktsapfmbenhassine
authored andcommitted
Use getDataSource method in DefaultBatchConfigurer
1 parent 68b77d0 commit 26fc468

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/DefaultBatchConfigurer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@ protected JobLauncher createJobLauncher() throws Exception {
115115

116116
protected JobRepository createJobRepository() throws Exception {
117117
JobRepositoryFactoryBean factory = new JobRepositoryFactoryBean();
118-
factory.setDataSource(this.dataSource);
118+
factory.setDataSource(getDataSource());
119119
factory.setTransactionManager(getTransactionManager());
120120
factory.afterPropertiesSet();
121121
return factory.getObject();
122122
}
123123

124124
protected JobExplorer createJobExplorer() throws Exception {
125125
JobExplorerFactoryBean jobExplorerFactoryBean = new JobExplorerFactoryBean();
126-
jobExplorerFactoryBean.setDataSource(this.dataSource);
126+
jobExplorerFactoryBean.setDataSource(getDataSource());
127127
jobExplorerFactoryBean.afterPropertiesSet();
128128
return jobExplorerFactoryBean.getObject();
129129
}

0 commit comments

Comments
 (0)