Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Spring Batchの紹介
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
yutachaos
April 12, 2018
Technology
300
0
Share
Spring Batchの紹介
2018.4.11 社内勉強会で発表した
Spring Batch実行環境のスライド
yutachaos
April 12, 2018
More Decks by yutachaos
See All by yutachaos
JenkinsのJobを CronJobに移した話 /The story of moving Jenkins Job to CronJob
yutachaos
0
250
History of Infrastructure as a Code testing
yutachaos
2
5.5k
AWS CodePipeline 初めて触って少しハマった話 / A story that challenged AWS CodePipeline for the first time
yutachaos
0
120
gRPC in スタディサプリENGLISH / gRPC in StudySapuri ENGLISH
yutachaos
0
3k
AKS,EKS,GKEコマンド比較してみた /compared AKS, EKS, GKE command
yutachaos
2
2.5k
AWS ECS の説明 /aws-ecs-introduction
yutachaos
0
120
Docker + Jenkinsでバッチ実行 / Using Docker and Jenkins execution batch
yutachaos
0
280
非エンジニア向けMarkdown 勉強会
yutachaos
1
450
Circle CI 入門
yutachaos
0
760
Other Decks in Technology
See All in Technology
脳が溶けた話 / Melted Brain
keisuke69
1
1.2k
FASTでAIエージェントを作りまくろう!
yukiogawa
4
190
The essence of decision-making lies in primary data
kaminashi
0
230
第26回FA設備技術勉強会 - Claude/Claude_codeでデータ分析 -
happysamurai294
0
350
FlutterでPiP再生を実装した話
s9a17
0
240
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
マルチモーダル非構造データとの闘い
shibuiwilliam
1
150
JAWS DAYS 2026でAIの「もやっと」感が解消された話
smt7174
1
120
JSTQB Expert Levelシラバス「テストマネジメント」日本語版のご紹介
ymty
0
110
推し活エージェント
yuntan_t
1
430
OpenClaw初心者向けセミナー / OpenClaw Beginner Seminar
cmhiranofumio
0
240
Babylon.js Japan Activities (2026/4)
limes2018
0
150
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Code Reviewing Like a Champion
maltzj
528
40k
Utilizing Notion as your number one productivity tool
mfonobong
4
280
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Building an army of robots
kneath
306
46k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
700
Paper Plane
katiecoart
PRO
1
48k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
450
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
860
Transcript
Spring Batch ղઆ 2018/4/11 ଜ༐ଠ
AGENDA • Spring Batchͱ • Ϣʔεέʔε • ΞʔΩςΫνϟ • ·ͱΊɹ
Spring Batchͱ • Java • Spring ProjectͷBatch͚ͷϑϨʔϜϫʔΫ • SpringͷDIίϯςφɺAOPɺτϥϯβΫγϣϯػೳΛϕʔεʹ࡞ ͞Ε͍ͯΔ
ϩΰ
SpringΛCOREͱͨ͠ɺJavaͷEnterprise͚ͷιϑτΣΞ Spring Projectͱ • Spring Boot • Spring Batch •
Spring Framework • Spring Cloud • Spring Shell • Spring Social • Spring LADP • ɾɾɾetc ͍ͬͺ͍͋Γ·͢ɻ
Ϣʔεέʔε • େྔσʔλͷBatchॲཧ • ༷ʑͳϦιʔεʹରԠ • DB, S3, http(s), fileͳͲSpringͷResourceLoaderͷࢿ࢈͕͑Δ
• ܗࣜ • CSV, TSV, json ,DBͳͲΛmappingͯ͠ϑΝΠϧʹಡΈࠐΈରԠՄ ೳ
Spring Batch ΞʔΩςΫνϟ
Spring Batch ղઆ 1 • JobશମͷྲྀΕJobRepository͕ཧ • Job͕1ͭͷେ͖ͳॲཧΛཧ • StepͷॲཧݻఆׂɺಈతʹՄมׂͷ୯ҐͰฒߦॲཧΛߦ͏
͜ͱ͕ग़དྷΔɻ
Spring Batch StepΞʔΩςΫνϟ(Chunk)
Spring Batch StepΞʔΩςΫνϟ(Tasklet)
Spring Batch ղઆ 2 • ॲཧϞσϧ • Chunk • Ұఆ݅ͷσʔλ͝ͱʹ·ͱΊͯͷread(ಡΈࠐΈ)ɺprocess(Ճ)ɺ
write(ॻ͖ࠐΈ)ͷྲྀΕͰॲཧ͢ΔํࣜɻॲཧͷྲྀΕΛఆܕԽ͠ɺ Ұ෦Λ ࣮͢Δ͚ͩͰδϣϒ͕࣮Ͱ͖Δɻ • Tasklet • ࣗ༝ʹॲཧΛهड़͢ΔํࣜͰ͋ΔɻSQLΛ1ճൃߦ͢Δ͚ͩɺίϚϯυΛ ൃߦ͢Δ͚ͩɺͱ͍ͬͨ؆ૉͳέʔε ෳͷσʔλϕʔεϑΝΠϧʹ ΞΫηε͠ͳ͕Βॲཧ͢ΔΑ͏ͳෳࡶͰఆܕԽ͠ʹ͍͘έʔεͰ༻͍Δɻ
KFCͷ߹ Spring Batch ར༻ྫ • େ͖͚ͯ͘ɺ2ͭͷॲཧ • ूܭ͞ΕͨσʔλΛϚΠϧσʔλͷDBʹInsert͢Δ (ॲཧ1) •
ूܭ͞ΕͨσʔλΛར༻ͯ͠ɺpush௨ͷͨΊͷAPI callͱΞϓϦ ଆͷDBͷߋ৽ (ॲཧ2) • ࣮ߦํ๏ • JenkinsΛJob Schedulerʹར༻͠ɺίϚϯυϥΠϯͰ࣮ߦ
·ͱΊ • σϝϦοτ • JavaɺSpringͷ͕ࣝඞཁ • Springࣗମͷίʔυϕʔε͕େͳͷͰɺSpringͷ෦·ͰೖΓࠐΜ ͩʹରԠͮ͠Β͍ɻ • ϝϦοτ
• Springͷࢿ࢈͕ར༻ग़དྷΔͷͰɺใ͕ଟ͍ɻ • ࠶࣮ߦɺฒྻॲཧɺޭɾࣦഊͳͲͷॲཧϑϩʔ͕طʹFWʹؚ·Εͯ ͍ΔͷͰɺ৺͢Δ͜ͱ͕গͳͯ͘ࡁΉ
͓ΘΓ
• ࢀߟจݙ • Macchinetta Batch Framework Development Guideline • TERASOLUNA
Batch Framework for Java (5.x) Development Guideline • 20170525 jsug όονຯ͕ͩʹཱͭ • https://www.slideshare.net/HasegawaDanna1/20170525-jsug