Skip to content

Allow MongoDB creation scripts to be idempotent #5328

@snicoll

Description

@snicoll

Right now, Spring Batch offers two ways to create or drop the necessary infrastructure to use Spring Batch with MongoDB.

Chatting with @mp911de, he's mentioning that some aspect of the initialization can be done on first request, while others can be made conditional. I don't what the best practices would be, but a feature where things are validated/created on startup would be quite useful for Spring Boot.

Right now, we have a way to create the store, or drop it. "create" isn't very useful in production so you'd switch it off. In dev you'd use create-drop, which isn't suitable when restarting the app and hacking on something.

In short, I am wondering if we could provide something in Spring Batch we could leverage. Doing so in Spring Boot is not an option and the lack of support would probably mean users will have to setup the schema manually.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions