Java

Java

Spring Boot Database UnitTest

Goal We would like to Test DAO or Service with Database operations. But, if we use database for testing directly,...
Java

Spring Elastic Search

Elastic Search Elastic Search is one of product in Elastic Stack. This is Lucene (Apache Lucene) base Index search. ...
Android

Android Chrome Debug

WebView Debug Some application uses WebView to support Web contents. In this time, we use WebView and load HTML f...
Java

Spring Batch Started

Spring Batch Started

Spring Batch is one of Spring family which supports Batch Application to develop. This is under Spring Boot 2.0.5

Simple Example

  • Do 2 tasks in 1 job
  • Don't save batch status into database(Sava HSQL)

build.gradle

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.5.RELEASE")
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

bootJar {
    baseName = 'gs-batch-processing'
    version =  '0.1.0'
}

repositories {
    mavenCentral()
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
    compile("org.springframework.boot:spring-boot-starter-batch")
    compile("org.hsqldb:hsqldb")
    testCompile("junit:junit")
}