Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Spring Batchの紹介

Spring Batchの紹介

2018.4.11 社内勉強会で発表した
Spring Batch実行環境のスライド

yutachaos

April 12, 2018
Tweet

More Decks by yutachaos

Other Decks in Technology

Transcript

  1. SpringΛCOREͱͨ͠ɺJavaͷEnterprise޲͚ͷιϑτ΢ΣΞ Spring Projectͱ͸ • Spring Boot • Spring Batch •

    Spring Framework • Spring Cloud • Spring Shell • Spring Social • Spring LADP • ɾɾɾetc ͍ͬͺ͍͋Γ·͢ɻ
  2. Spring Batch ղઆ 2 • ॲཧϞσϧ • Chunk • Ұఆ݅਺ͷσʔλ͝ͱʹ·ͱΊͯͷread(ಡΈࠐΈ)ɺprocess(Ճ޻)ɺ

    write(ॻ͖ࠐΈ)ͷྲྀΕͰॲཧ͢ΔํࣜɻॲཧͷྲྀΕΛఆܕԽ͠ɺ Ұ෦Λ ࣮૷͢Δ͚ͩͰδϣϒ͕࣮૷Ͱ͖Δɻ • Tasklet • ࣗ༝ʹॲཧΛهड़͢ΔํࣜͰ͋ΔɻSQLΛ1ճൃߦ͢Δ͚ͩɺίϚϯυΛ ൃߦ͢Δ͚ͩɺͱ͍ͬͨ؆ૉͳέʔε΍ ෳ਺ͷσʔλϕʔε΍ϑΝΠϧʹ ΞΫηε͠ͳ͕Βॲཧ͢ΔΑ͏ͳෳࡶͰఆܕԽ͠ʹ͍͘έʔεͰ༻͍Δɻ
  3. KFCͷ৔߹ Spring Batch ར༻ྫ • େ͖͘෼͚ͯɺ2ͭͷॲཧ • ूܭ͞ΕͨσʔλΛϚΠϧσʔλͷDBʹInsert͢Δ (ॲཧ1) •

    ूܭ͞ΕͨσʔλΛར༻ͯ͠ɺpush௨஌ͷͨΊͷAPI callͱΞϓϦ ଆͷDBͷߋ৽ (ॲཧ2) • ࣮ߦํ๏ • JenkinsΛJob Schedulerʹར༻͠ɺίϚϯυϥΠϯͰ࣮ߦ
  4. ·ͱΊ • σϝϦοτ • JavaɺSpringͷ஌͕ࣝඞཁ • Springࣗମͷίʔυϕʔε͕๲େͳͷͰɺSpringͷ಺෦·ͰೖΓࠐΜ ͩ໰୊ʹରԠͮ͠Β͍ɻ • ϝϦοτ

    • Springͷࢿ࢈͕ར༻ग़དྷΔͷͰɺ৘ใ͕ଟ͍ɻ • ࠶࣮ߦɺฒྻॲཧɺ੒ޭɾࣦഊͳͲͷॲཧϑϩʔ͕طʹFWʹؚ·Εͯ ͍ΔͷͰɺ৺഑͢Δ͜ͱ͕গͳͯ͘ࡁΉ
  5. • ࢀߟจݙ • Macchinetta Batch Framework Development Guideline • TERASOLUNA

    Batch Framework for Java (5.x) Development Guideline • 20170525 jsug όον͸஍ຯ͕ͩ໾ʹཱͭ • https://www.slideshare.net/HasegawaDanna1/20170525-jsug