Skip to content

Instantly share code, notes, and snippets.

@RickSlot
Last active April 14, 2023 13:28
Show Gist options
  • Save RickSlot/06c344333782bce66d90080cbf28aa06 to your computer and use it in GitHub Desktop.
Save RickSlot/06c344333782bce66d90080cbf28aa06 to your computer and use it in GitHub Desktop.
@DynamicPropertySource
static void registerMongoProperties(DynamicPropertyRegistry registry) {
registry.add("spring.data.mongodb.uri", () -> mongoDBContainer.getConnectionString() + DATABASE_NAME);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment