Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

SpringBoot+MyBatisで例外が出たときどこを見るか

syukai
March 27, 2024

 SpringBoot+MyBatisで例外が出たときどこを見るか

syukai

March 27, 2024
Tweet

More Decks by syukai

Other Decks in Programming

Transcript

  1. αϯϓϧ ݺͼग़͠Օॴ demoMapper.get(); %FNP.BQQFSKBWB @Mapper public interface DemoMapper { List<Demo>

    get();_ } %FNP.BQQFSYNM <select id="get"> SELECT * FROM demo </select> (JU)VCIUUQTHJUIVCDPNTZVLBJNZCBUJTFSSPSMFBSOJOHXJUITQSJOHCPPU
  2. ΍ͬͯ͘ΕΔ͜ͱ  ʢΞϓϦىಈ࣌ʣ9.-Λϩʔυ  .BQϑΝΠϧΛ୳͢  ύϥϝλ౉͢ɺ໭Γ஋ͷϚοϐϯά  42-Λ४උ͢Δ QSFQBSF

      42-Λ࣮ߦͯ͠%#͔Β݁ՌΛड͚औΔ  ΦϒδΣΫτʹ஋Λ୅ೖ ͦΕͧΕͷॲཧͰΤϥʔ͕ൃੜ͠͏Δ ίϯύΠϧΤϥʔʹͳΒͳ͍
  3. ൃੜ͢Δྫ֎ͱz͋Δ͋Δz w PSHNZCBUJTTQSJOH.Z#BUJT4ZTUFN&YDFQUJPO w DBVTFECZPSHBQBDIFJCBUJTSF fl FDUJPO3F fl FDUJPO&YDFQUJPO w

    ϓϩύςΟ͕ͳ͍ w ϓϩύςΟ໊ؒҧ͑ͯΔʢେจࣈɾখจࣈʣ w ϓϩύςΟͷ֊૚Λؒҧ͑ͯΔ
  4. ൃੜ͢Δྫ֎ͱz͋Δ͋Δz w PSHNZCBUJTTQSJOH.Z#BUJT4ZTUFN&YDFQUJPO w $BVTFECZPSHBQBDIFJCBUJTSF fl FDUJPO3F fl FDUJPO&YDFQUJPO w

    ֨ೲ͢ΔΫϥεʹద੾ͳίϯετϥΫλ͕ແ͍ w Ҿ਺ͳ͠ίϯετϥΫλ͔ɺ֨ೲ͢Δશ߲໨ͷҾ਺Λ࣋ͭίϯετϥ Ϋλ͕ଥ౰ w QSJWBUFͰ΋େৎ෉ w ίϯετϥΫλະఆٛͳΒσϑΥϧτͰҾ਺ͳ͕͠༻ҙ͞ΕΔ
  5. ྫʣ )PHF\ 'VHBGVHBOFX'VHB  )PHF \^ HFU'VHB \ JG GVHBWBMVFOVMM

     SFUVSOOFX'VHB  SFUVSOGVHB ^  ίϯετϥΫλʹΑΓGVHBOVMMͷ )PHFΠϯελϯε͕࡞ΒΕΔ  .Z#BUJT͸GVHBʹ୅ೖ͢ΔͨΊ HFU'VHBͰऔΓग़ͨ͠ϓϩύςΟʹ ஋Λ୅ೖ͠Α͏ͱ͢Δ  GVHB͸OVMMͳͷͰ৽͍͠'VHBΠϯ ελϯε͕ฦ͞ΕΔ  ̏Ͱ࡞ͬͨΠϯελϯεʹ஋Λ୅ೖ  )PHFGVHB͸OVMMͷ··ɾɾɾ )PHF GVHB OVMM GVHB HFU'VHB ୅ೖ