From 784a5a82c8b9cfb78786fefb823e3d3066d9009c Mon Sep 17 00:00:00 2001 From: Michael Minella Date: Mon, 25 Sep 2017 15:09:05 -0500 Subject: [PATCH] JSR-352 Doc Updates This commit refactors the JSR-352 documention to utilize the new java vs xml toggle. Added headers to source listings to clarify for PDF version --- spring-batch-docs/asciidoc/jsr-352.adoc | 29 +++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/spring-batch-docs/asciidoc/jsr-352.adoc b/spring-batch-docs/asciidoc/jsr-352.adoc index d12ee8f28..ba1f84eca 100644 --- a/spring-batch-docs/asciidoc/jsr-352.adoc +++ b/spring-batch-docs/asciidoc/jsr-352.adoc @@ -6,6 +6,8 @@ == JSR-352 Support +include::toggle.adoc[] + As of Spring Batch 3.0 support for JSR-352 has been fully implemented. This section is not a replacement for the spec itself and instead, intends to explain how the JSR-352 specific concepts apply to Spring Batch. Additional information on JSR-352 can be found via the @@ -182,7 +184,8 @@ To use Spring dependency injection within a JSR-352 based batch job consists of them as it would any bean defined within the batch.xml. -[source, xml] +.XML Configuration +[source, xml, role="xmlContent"] ---- - +---- + +.Java Configuration +[source, java, role="javaContent"] +---- +@Configuration +public class BatchConfiguration { + + @Bean + public Batchlet fooBatchlet() { + FooBatchlet batchlet = new FooBatchlet(); + batchlet.setProp("bar"); + return batchlet; + } +} + + + + + + + + ---- The assembly of Spring contexts (imports, etc) works with JSR-352 jobs just as it would with any other