Updated readmes to improve copy pastability

Also added instructions for native compilation for those apps that it is useful

Added documentation for native compilation when using Single Step Batch Processing

Updated documentaiton for native compilation for single app processing
This commit is contained in:
Glenn Renfro
2022-10-05 14:37:12 -04:00
parent 704667d542
commit b7b7de5337
13 changed files with 144 additions and 49 deletions

View File

@@ -365,6 +365,32 @@ itself by setting the following properties:
See the https://docs.spring.io/spring-batch/docs/4.3.x/api/org/springframework/batch/item/kafka/KafkaItemReader.html[`KafkaItemReader` documentation].
[[nativeCompilation]]
=== Native Compilation
The advantage of Single Step Batch Processing is that it lets you dynamically select which reader and writer beans to use at runtime when you use the JVM.
However, when you use native compilation, you must determine the reader and writer at build time instead of runtime.
The following example does so:
[source,xml]
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>process-aot</id>
<goals>
<goal>process-aot</goal>
</goals>
<configuration>
<jvmArguments>
-Dspring.batch.job.flatfileitemreader.name=fooReader
-Dspring.batch.job.flatfileitemwriter.name=fooWriter
</jvmArguments>
</configuration>
</execution>
</executions>
</plugin>
[[item-processors]]
== ItemProcessor Configuration