<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kagamihoge</author_name>
  <author_url>https://blog.hatena.ne.jp/kagamihoge/</author_url>
  <blog_title>kagamihogeの日記</blog_title>
  <blog_url>https://kagamihoge.hatenablog.com/</blog_url>
  <categories>
    <anon>Java</anon>
    <anon>SQL</anon>
    <anon>Spring Boot</anon>
    <anon>Spring Batch</anon>
  </categories>
  <description>背景 Javaでキーブレイク*1を意識することはあまり無い。JPAならOneToManyで自動的にコレクションにマッピングされるし、JSONやXMLでも同様である。 今回、spring-batchでO/Rをとある事情で使えずSQLを直接使用、かつ、キーブレイクが必要になった。その実現方法について考える。こちらにある通り、SingleItemPeekableItemReaderとtaskletを組み合わせれば可能だが、今回はchunkで何とかする方法について。 基本的な考え方はこちらと同様にSingleItemPeekableItemReaderでキーブレイクを実現する。このときdelegate…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkagamihoge.hatenablog.com%2Fentry%2F2020%2F09%2F21%2F004203&quot; title=&quot;spring-batchでJDBCのキーブレイク - kagamihogeの日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-09-21 00:42:03</published>
  <title>spring-batchでJDBCのキーブレイク</title>
  <type>rich</type>
  <url>https://kagamihoge.hatenablog.com/entry/2020/09/21/004203</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
