Skip to content

Commit 39b8279

Browse files
committed
Fix incorrect reference to SimpleJdbcTemplate in reference documentation
Resolves #4197
1 parent be231f7 commit 39b8279

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

spring-batch-docs/src/main/asciidoc/testing.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,19 @@ public class SkipSampleFunctionalTests {
8787
@Autowired
8888
private JobLauncherTestUtils jobLauncherTestUtils;
8989
90-
private SimpleJdbcTemplate simpleJdbcTemplate;
90+
private JdbcTemplate jdbcTemplate;
9191
9292
@Autowired
9393
public void setDataSource(DataSource dataSource) {
94-
this.simpleJdbcTemplate = new SimpleJdbcTemplate(dataSource);
94+
this.jdbcTemplate = new JdbcTemplate(dataSource);
9595
}
9696
9797
@Test
9898
public void testJob(@Autowired Job job) throws Exception {
9999
this.jobLauncherTestUtils.setJob(job);
100-
simpleJdbcTemplate.update("delete from CUSTOMER");
100+
this.jdbcTemplate.update("delete from CUSTOMER");
101101
for (int i = 1; i <= 10; i++) {
102-
simpleJdbcTemplate.update("insert into CUSTOMER values (?, 0, ?, 100000)",
102+
this.jdbcTemplate.update("insert into CUSTOMER values (?, 0, ?, 100000)",
103103
i, "customer" + i);
104104
}
105105
@@ -124,19 +124,19 @@ public class SkipSampleFunctionalTests {
124124
@Autowired
125125
private JobLauncherTestUtils jobLauncherTestUtils;
126126
127-
private SimpleJdbcTemplate simpleJdbcTemplate;
127+
private JdbcTemplate jdbcTemplate;
128128
129129
@Autowired
130130
public void setDataSource(DataSource dataSource) {
131-
this.simpleJdbcTemplate = new SimpleJdbcTemplate(dataSource);
131+
this.jdbcTemplate = new JdbcTemplate(dataSource);
132132
}
133133
134134
@Test
135135
public void testJob(@Autowired Job job) throws Exception {
136136
this.jobLauncherTestUtils.setJob(job);
137-
simpleJdbcTemplate.update("delete from CUSTOMER");
137+
this.jdbcTemplate.update("delete from CUSTOMER");
138138
for (int i = 1; i <= 10; i++) {
139-
simpleJdbcTemplate.update("insert into CUSTOMER values (?, 0, ?, 100000)",
139+
this.jdbcTemplate.update("insert into CUSTOMER values (?, 0, ?, 100000)",
140140
i, "customer" + i);
141141
}
142142

spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public void setJdbcTemplate(NamedParameterJdbcOperations namedParameterJdbcTempl
137137
}
138138

139139
/**
140-
* Check mandatory properties - there must be a SimpleJdbcTemplate and an SQL
140+
* Check mandatory properties - there must be a NamedParameterJdbcOperations and an SQL
141141
* statement plus a parameter source.
142142
*/
143143
@Override

spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ void testSunnyDayFaultTolerant() throws Exception {
9595
void testSkipsInWriter() throws Exception {
9696
JobExecution jobExecution = jobLauncher.run(job,
9797
new JobParametersBuilder().addString("item.three", "fail").addLong("run.id", 1L).toJobParameters());
98-
// System.err.println(new SimpleJdbcTemplate(dataSource).queryForList("SELECT *
99-
// FROM INT_MESSAGE_GROUP"));
10098
assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus());
10199
StepExecution stepExecution = jobExecution.getStepExecutions().iterator().next();
102100
assertEquals(9, stepExecution.getReadCount());

0 commit comments

Comments
 (0)