Pull in code blocks with {!include:...} syntax

This commit is contained in:
Chris Beams
2013-06-03 09:16:24 +02:00
parent 263b7cffb1
commit 79dbf05bba
3 changed files with 27 additions and 349 deletions
+19 -348
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -24,6 +24,7 @@
</dependency>
</dependencies>
<!-- {!begin#shade-config} -->
<properties>
<start-class>hello.BatchConfiguration</start-class>
</properties>
@@ -36,6 +37,7 @@
</plugin>
</plugins>
</build>
<!-- {!end#shade-config} -->
<repositories>
<repository>
@@ -35,6 +35,7 @@ import org.springframework.jdbc.core.RowMapper;
@EnableAutoConfiguration
public class BatchConfiguration {
// {!begin#reader-writer-processor}
@Bean
public ItemReader<Person> reader() {
FlatFileItemReader<Person> reader = new FlatFileItemReader<Person>();
@@ -63,7 +64,9 @@ public class BatchConfiguration {
writer.setDataSource(dataSource);
return writer;
}
// {!end#reader-writer-processor}
// {!begin#job-step}
@Bean
public Job importUserJob(JobBuilderFactory jobs, Step s1) {
return jobs.get("importUserJob")
@@ -83,7 +86,9 @@ public class BatchConfiguration {
.writer(writer)
.build();
}
// {!end#job-step}
// {!begin#template-main}
@Bean
public JdbcTemplate jdbcTemplate(DataSource dataSource) {
return new JdbcTemplate(dataSource);
@@ -101,5 +106,5 @@ public class BatchConfiguration {
System.out.println("Found <" + person + "> in the database.");
}
}
// {!end#template-main}
}