已开启
add: 新增基于 Spring Batch 开发指导文档 #8884
add: 新增基于 Spring Batch 开发指导文档 #8884
已开启
wsrym创建于 18 天前
wsrym
wsrym
18 天前

【标题】(请简要描述下实现的内容)
新增基于 Spring Batch 开发指导文档
【实现内容】:

  1. 新增开发指导文档两份(内容一致):
    - docs/zh/mysql_compatibility_developer_guide/springbatch_development.md
    - docs-lite/zh/mysql_compatibility_developer_guide/springbatch_development.md
    内容包括:
    - 开发环境准备(Spring Boot 3.5.16、Spring Batch 5.2.x、MySQL Connector/J,经 dolphin MySQL 协议连接 openGauss B 兼容库,端口 3308);
    - 作业与步骤开发示例(数据加工作业 copyUserJob:读 user 表 → 大写 + age+1 → 写 user_batch_out,chunk=2;BATCH_* 元数据表由 spring.batch.jdbc.initialize-schema=always自动初始化说明);
    - 六个核心特性示例小节:失败重启与断点恢复、JdbcPagingItemReader分页读、监听器族(Step/Chunk/Skip/ItemProcess)、条件流(on("FAILED")/on("*"))、晚绑定(@StepScope/@JobScope)、JobExplorer/JobOperator 元数据查询;
    - 注意事项:B 模式已知差异 FINDING A(失败作业 EXIT_MESSAGE 超长被拒,error 130)、FINDING B(SET sql_select_limit 不被识别,error 28804)及对应规避措施;
    - 示例运行日志(18 用例全部通过)。
    2. 两个目录的 _toc.yaml 各新增"基于Spring Batch开发"条目(位于"基于SpringDataJPA开发"与"基于HikariCP开发"之间)。
    【根因分析】:
    手册 mysql_compatibility_developer_guide 已有 mybatis/mybatis-plus/hibernate/Spring Boot/SpringDataJPA 等框架连接 B 库的开发指导,尚无 Spring Batch 相关文档;社区缺乏 SpringBatch 配合 MySQL JDBC 连接 B 库的实测结论(批处理元数据表初始化、分页读等环节的兼容性需要实测记录)。
    【实现方案】:
    参照同手册既有文档结构(以 SpringDataJPA 开发指导为模板)新增 Spring Batch 开发指导:环境准备 → 作业示例 → 六个核心特性小节 → 注意事项(实测差异与规避)→示例日志;按同一手册小节一份文档一个 PR 的先例,同步注册 _toc.yaml 条目。
    【关联需求或issue】:
    https://gitcode.com/opengauss/opensource-intership/issues/29
    【开发自验报告】:

  2. 请附上自验结果(内容或者截图)
    文档全部示例代码与运行日志来自 examples 仓 springbatch-connect-opengauss-b 工程实测(18 用例全部通过、8 档驱动矩阵 144 例次全部通过);_toc.yaml 按既有格式插入条目。

  3. 是否可以添加fastcheck测试用例,如是,请补充fastcheck用例

  4. 是否涉及资料修改,如是,在docs仓库补充资料

  5. 是否考虑升级场景(系统表修改、日志持久化以及修改执行态数据格式)

  6. 是否考虑在线扩容等扩展场景

  7. 是否考虑异常场景/并发场景/前向兼容/性能场景

  8. 是否对其他模块产生影响

  9. 是否需要回合补丁版本(5.0、6.0),涉及(结果错误|coredump|性能劣化|内存泄露|集群异常)相关修复请排查回合补丁分支

  10. 针对Plugin仓dolphin插件,新增/修改的代码是否已使用 DOLPHIN 宏进行控制,方便后续回合openGauss-server仓代码

【当前PR是否有AI参与】:
[x] 否
[ ] 是
__1. AI Agent 平台:
__2. AI 模型:
__3. Prompt上下文 :

【其他说明】:
文档中记录的 FINDING A / FINDING B 均按已知差异处理(与 MySQL 行为对比后给出规避措施);配套测试工程 PR 已另提 examples 仓(《新增 Spring Batch 配合 MySQLJDBC 连接 openGauss B 库示例与自测》)。
两个 PR 描述的差异点:标题、实现内容(工程 → 文档清单)、第 3 条(否 → 是)、其他说明(互相引用对方的 PR)。其余字段两仓一致。

likedislike
合并受阻
wsrymwsrym
18 天前 创建了 pull request,commit fff808b3
wsrymwsrym
18 天前 关联了issue:[开源实习]: openGauss B库B协议适配MySQL Java框架 Spring Batch
opengauss-ci-bot成员
18 天前 评论:

openGauss pipeline is running. Please wait a moment...

likedislike
opengauss-ci-bot成员
18 天前 评论:

openGauss pipeline is running. Please wait a moment...

likedislike
opengauss_botopengauss_bot成员
18 天前 将ywzq1161327784,chenxiaobin19,totaj,congzhou2603,shenzheng4,chendong76,dodders,muyulinzhong,shirley_zhengx,quemingjian,jemappellehc,wofanzheng,wlff234,libiao2024,hwworkholic,CarrotGo,superlchf设为审查人
此处折叠了73条消息 查看更多
opengauss_botopengauss_bot成员
6 天前 删除了label:ci-pipeline-success
opengauss_bot
opengauss_bot成员
6 天前 评论:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): ci-pipeline-success.

likedislike
opengauss_botopengauss_bot成员
6 天前 添加了label:opengauss-cla/yes
opengauss_bot
opengauss_bot成员
6 天前 评论:

CLA Signature Pass

lele-2026, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
opengauss_bot
opengauss_bot成员
6 天前 评论:
检查项 状态
敏感信息扫描 ❌
安全编码扫描 ✅
漏洞扫描 ✅
开源license合规扫描 ✅
UT覆盖率 ✅
开发阶段设计文档检查 ❌
流水线链接 点击跳转查看日志
likedislike