diff --git a/spring-batch-docs/src/main/asciidoc/testing.adoc b/spring-batch-docs/src/main/asciidoc/testing.adoc index ea4b3b534..8e0f2c074 100644 --- a/spring-batch-docs/src/main/asciidoc/testing.adoc +++ b/spring-batch-docs/src/main/asciidoc/testing.adoc @@ -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); } diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java index d98e950bb..81e701ce3 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java @@ -137,7 +137,7 @@ public class JdbcBatchItemWriter implements ItemWriter, 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 diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests.java index 094cb6b70..f5f3a0229 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests.java @@ -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());