Skip to content

Add Spring Batch MongoDB dependency metadata#2173

Open
eddumelendez wants to merge 2 commits intospring-io:mainfrom
eddumelendez:add-batch-data-mongodb
Open

Add Spring Batch MongoDB dependency metadata#2173
eddumelendez wants to merge 2 commits intospring-io:mainfrom
eddumelendez:add-batch-data-mongodb

Conversation

@eddumelendez
Copy link
Copy Markdown
Contributor

Also, generate test app when selected along with docker
compose or testcontainers.

Signed-off-by: Eddú Meléndez eddu.melendez@gmail.com

Copilot AI review requested due to automatic review settings April 25, 2026 07:27
@eddumelendez eddumelendez force-pushed the add-batch-data-mongodb branch from c459b26 to 80fcf3f Compare April 25, 2026 07:28
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 25, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Spring Batch MongoDB support to the start-site metadata and ensures MongoDB Testcontainers / Docker Compose integration is triggered when that dependency is selected.

Changes:

  • Add batch-data-mongodb dependency metadata (spring-boot-starter-batch-data-mongodb) with Boot 4.1+ compatibility.
  • Treat batch-data-mongodb like other MongoDB starters for Testcontainers module auto-configuration and MongoDB docker-compose/service-connection generation.
  • Add/extend tests to cover build generation, HELP.md links, docker-compose, and generated Testcontainers configuration.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
start-site/src/main/resources/application.yml Adds dependency metadata entry for Spring Batch MongoDB.
start-site/src/main/java/io/spring/start/site/extension/dependency/testcontainers/TestcontainersModuleRegistry.java Includes batch-data-mongodb in the MongoDB Testcontainers module/link registration.
start-site/src/main/java/io/spring/start/site/extension/dependency/mongodb/MongoDbProjectGenerationConfiguration.java Enables MongoDB docker-compose/service-connection contributions when batch-data-mongodb is present.
start-site/src/test/java/io/spring/start/site/extension/dependency/testcontainers/TestcontainersProjectGenerationConfigurationTests.java Adds build and HELP.md link tests for batch-data-mongodb + Testcontainers.
start-site/src/test/java/io/spring/start/site/extension/dependency/springbatch/SpringBatchTestBuildCustomizerTests.java Adds a test asserting the new dependency appears in the generated pom for Boot 4.1.
start-site/src/test/java/io/spring/start/site/extension/dependency/mongodb/MongoDbProjectGenerationConfigurationTests.java Adds docker-compose and Testcontainers generation tests for batch-data-mongodb.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +160 to +170
@Test
void linkToBatchDataMongoDbWhenTestContainerIsPresentIsAdded() {
ProjectRequest request = createProjectRequest(SupportedBootVersion.V4_1, "testcontainers",
"batch-data-mongodb");
assertThat(helpDocument(request)).contains("https://java.testcontainers.org/modules/databases/mongodb/");
}

@Test
void linkToBatchDataMongoDbWhenTestContainerIsNotPresentIsNotAdded() {
ProjectRequest request = createProjectRequest(SupportedBootVersion.V4_1, "batch-data-mongodb");
assertThat(helpDocument(request)).doesNotContain("https://java.testcontainers.org/modules/databases/mongodb/");
Comment on lines +57 to +59
void shouldAddBatchDataMongoDbDependency() {
ProjectRequest request = createProjectRequest(SupportedBootVersion.V4_1, "batch-data-mongodb");
assertThat(mavenPom(request)).hasDependency(getDependency(SupportedBootVersion.V4_1, "batch-data-mongodb"));
@eddumelendez
Copy link
Copy Markdown
Contributor Author

looks like fails because of spring-projects/spring-boot#50223

Also, generate test app when selected along with docker
compose or testcontainers.

Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
@eddumelendez eddumelendez force-pushed the add-batch-data-mongodb branch from 80fcf3f to 28b9b6b Compare April 27, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants