Fix incorrect reference to SimpleJdbcTemplate in reference documentation
Resolves #4197
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user