Fix incorrect reference to SimpleJdbcTemplate in reference documentation

Resolves #4197
This commit is contained in:
Mahmoud Ben Hassine
2022-09-22 07:11:33 +02:00
parent be231f7316
commit 39b8279831
3 changed files with 9 additions and 11 deletions

View File

@@ -87,19 +87,19 @@ public class SkipSampleFunctionalTests {
@Autowired
private JobLauncherTestUtils jobLauncherTestUtils;
private SimpleJdbcTemplate simpleJdbcTemplate;
private JdbcTemplate jdbcTemplate;
@Autowired
public void setDataSource(DataSource dataSource) {
this.simpleJdbcTemplate = new SimpleJdbcTemplate(dataSource);
this.jdbcTemplate = new JdbcTemplate(dataSource);
}
@Test
public void testJob(@Autowired Job job) throws Exception {
this.jobLauncherTestUtils.setJob(job);
simpleJdbcTemplate.update("delete from CUSTOMER");
this.jdbcTemplate.update("delete from CUSTOMER");
for (int i = 1; i <= 10; i++) {
simpleJdbcTemplate.update("insert into CUSTOMER values (?, 0, ?, 100000)",
this.jdbcTemplate.update("insert into CUSTOMER values (?, 0, ?, 100000)",
i, "customer" + i);
}
@@ -124,19 +124,19 @@ public class SkipSampleFunctionalTests {
@Autowired
private JobLauncherTestUtils jobLauncherTestUtils;
private SimpleJdbcTemplate simpleJdbcTemplate;
private JdbcTemplate jdbcTemplate;
@Autowired
public void setDataSource(DataSource dataSource) {
this.simpleJdbcTemplate = new SimpleJdbcTemplate(dataSource);
this.jdbcTemplate = new JdbcTemplate(dataSource);
}
@Test
public void testJob(@Autowired Job job) throws Exception {
this.jobLauncherTestUtils.setJob(job);
simpleJdbcTemplate.update("delete from CUSTOMER");
this.jdbcTemplate.update("delete from CUSTOMER");
for (int i = 1; i <= 10; i++) {
simpleJdbcTemplate.update("insert into CUSTOMER values (?, 0, ?, 100000)",
this.jdbcTemplate.update("insert into CUSTOMER values (?, 0, ?, 100000)",
i, "customer" + i);
}

View File

@@ -137,7 +137,7 @@ public class JdbcBatchItemWriter<T> implements ItemWriter<T>, InitializingBean {
}
/**
* Check mandatory properties - there must be a SimpleJdbcTemplate and an SQL
* Check mandatory properties - there must be a NamedParameterJdbcOperations and an SQL
* statement plus a parameter source.
*/
@Override

View File

@@ -95,8 +95,6 @@ class RemoteChunkFaultTolerantStepJdbcIntegrationTests {
void testSkipsInWriter() throws Exception {
JobExecution jobExecution = jobLauncher.run(job,
new JobParametersBuilder().addString("item.three", "fail").addLong("run.id", 1L).toJobParameters());
// System.err.println(new SimpleJdbcTemplate(dataSource).queryForList("SELECT *
// FROM INT_MESSAGE_GROUP"));
assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus());
StepExecution stepExecution = jobExecution.getStepExecutions().iterator().next();
assertEquals(9, stepExecution.getReadCount());