首页 / 作者AUTHOR / SPRINGFORALL

hello

记录技术探索,分享实践心得。

共 1966 篇文章

Spring Batch 6.1 PageableItemReader:错名编译期拦住

Spring Batch 6.1.0-RC1 新增 PageableItemReader,用 Function<Pageable, Slice<T>> / 方法引用替代 RepositoryItemReader 的 methodName 字符串反射。Boot 4.2.0-RC1 + Data JPA + H2 对照:pageSize=3、id 升序时两边都读出 11 条 Shanghai(chunk 3/3/3/2);错写 methodName 运行时 NoSuchMethodException,方法引用则编译期拦住。