Goal of guideline
This guideline provides best practices to develop high maintainability Batch applications using full stack framework focusing on Spring Framework, Spring Batch and MyBatis.
This guideline helps to proceed with the software development (mainly coding) smoothly.
Target readers
This guideline is written for architects and programmers having software development experience and knowledge of the following.
-
Basic knowledge of DI and AOP of Spring Framework
-
Application development experience using Java
-
Knowledge of SQL
-
Have experiences on using Maven
This guideline is not for beginners.
In order to check whether one has enough basic knowledge to understand the document, refer to Spring Framework Comprehension Check If one is not able to answer 40% of the comprehension test, then it is recommended to study the following books separately.
Structure of guideline
The most important thing is that the guideline is considered as the subset of TERASOLUNA Server Framework for Java (5.x) Development Guideline (hereafter, referred to as TERASOLUNA Server 5.x Development Guideline). By using TERASOLUNA Server 5.x Development Guideline, you can eliminate duplication in explanation and reduce the cost of learning as much as possible. Since it indicates reference to TERASOLUNA Server 5.x Development Guideline everywhere, we would like you to proceed with the development by using both guides.
- TERASOLUNA Batch Framework for Java (5.x) concept
-
Explains the basic concept of batch processing and the basic concept of TERASOLUNA Batch Framework for Java (5.x) and the overview of Spring Batch.
- Methodology of application development
-
Explains the knowledge and method to be kept in mind while developing an application using TERASOLUNA Batch Framework for Java (5.x).
- Running a Job
-
Explains how to running a job as Synchronous, Asynchronous and provide job parameters.
- Input/output of data
-
Explains how to provide Input/Output to various resources such as Database, File access etc.
- Handling for abnormal condition
-
Explains how to handle the abnormal conditions like Input checks, Exceptions.
- Job management
-
Explains how to manage the Job execution.
- Flow control and parallel/multiple processing
-
Explains the processing of parallel/multiple Job execution.
How to read guideline
It is strongly recommended for all the developers to read the following contents for using TERASOLUNA Batch Framework for Java (5.x).
The following contents usually required, so you should read in advance. It is better to select according to the development feature of the job.
Refer to the following contents for the first time when proceeding advanced implementation.
Notations in guideline
This section describe for the notations of this guideline.
- About Windows command prompt and Unix terminal
-
If command syntax in Windows and Unix are different, it describe both. Otherwise, standardize the notations of Unix.
- Prompt sign
-
Describe as
$
in Unix.
$ java -version
- About defining properties and constructor of Bean definition
-
In this guideline, it is described by using namespace of
p
andc
. The use of namespace helps in simplifying and clarifying the description of Bean definition.
<bean class="org.springframework.batch.item.file.mapping.DefaultLineMapper">
<property name="lineTokenizer">
<bean class="org.terasoluna.batch.item.file.transform.FixedByteLengthLineTokenizer"
c:ranges="1-6, 7-10, 11-12, 13-22, 23-32"
c:charset="MS932"
p:names="branchId,year,month,customerId,amount"/>
</property>
</bean>
For your reference, the description not using namespace is shown.
<bean class="org.springframework.batch.item.file.mapping.DefaultLineMapper">
<property name="lineTokenizer">
<bean class="org.terasoluna.batch.item.file.transform.FixedByteLengthLineTokenizer">
<constructor-arg index="0" value="1-6, 7-10, 11-12, 13-22, 23-32"/>
<constructor-arg index="1" value="MS932"/>
<property name="names" value="branchId,year,month,customerId,amount"/>
</property>
</bean>
This guideline does not force the user to use namespace. We would like to consider it for simplifying the explanation.
Tested environments of guideline
For tested environments of contents described in this guideline, refer to " Tested Environment".