java - 配置弹簧批处理而不持久化元数据
问题描述
我需要更改不需要保留在 Spring Batch 元数据表中的 Spring Batch 应用程序,而是需要使用内存中的元数据。我的应用程序不是 Spring-Boot 应用程序,我正在为 spring 使用 java 配置。另外我需要坚持到应用程序表中,所以我需要使用数据源。
解决方案
将内存数据库添加到您的 Gradle 项目依赖项中,例如 h2 :
compile 'com.h2database:h2:1.4.194'
批处理会自动将元数据存储在 h2 中。
推荐阅读
- hyperledger-fabric - Hyperledger Composer Rest 服务器 - POST 请求超时
- javascript - 将库包组合成单节点包
- xml - 如何在自定义功能区选项卡中使用内置 Outlook 组
- javascript - 背景颜色从下到上悬停动画
- html - 如何从 HTML 文件获取 TextField 值到 TypeScript 文件?
- openmp - 执行时间工作共享与 spmd
- cmd - 如何在 System.cmd 中使用管道?
- azure - 使用 spark 和 azure 进行批处理
- c++ - c++ 默认移动赋值不能访问受保护的基成员
- multithreading - 如何实现多线程