首页 > 解决方案 > 配置弹簧批处理而不持久化元数据

问题描述

我需要更改不需要保留在 Spring Batch 元数据表中的 Spring Batch 应用程序,而是需要使用内存中的元数据。我的应用程序不是 Spring-Boot 应用程序,我正在为 spring 使用 java 配置。另外我需要坚持到应用程序表中,所以我需要使用数据源。

标签: javaspringspring-batch

解决方案


将内存数据库添加到您的 Gradle 项目依赖项中,例如 h2 :

compile 'com.h2database:h2:1.4.194'

批处理会自动将元数据存储在 h2 中。


推荐阅读