Add Spring Batch MongoDB dependency metadata#2173
Open
eddumelendez wants to merge 2 commits intospring-io:mainfrom
Open
Add Spring Batch MongoDB dependency metadata#2173eddumelendez wants to merge 2 commits intospring-io:mainfrom
eddumelendez wants to merge 2 commits intospring-io:mainfrom
Conversation
c459b26 to
80fcf3f
Compare
There was a problem hiding this comment.
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-mongodbdependency metadata (spring-boot-starter-batch-data-mongodb) with Boot 4.1+ compatibility. - Treat
batch-data-mongodblike 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")); |
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>
80fcf3f to
28b9b6b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also, generate test app when selected along with docker
compose or testcontainers.
Signed-off-by: Eddú Meléndez eddu.melendez@gmail.com