-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow easy customization of EmbeddedMongo DownloadConfig #15496
Conversation
@mgmeiner Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@mgmeiner Thank you for signing the Contributor License Agreement! |
@mgmeiner Thanks very much for opening your first contribution to Spring Boot. Given that, as far as we know, you requirements are fairly unusual, I wonder if the new properties are justified. To reduce the surface area of the changes I think it might be better to only offer a bean-based solution. That could either be the conditional |
…mization of EmbeddedMongo DownloadConfig
@wilkinsona I like your idea on this and you're right: introducing new properties for the download config which is indeed a very specific case - is not justified. I updated the PR and implemented it how you suggested. I named the Customizer |
not sure why the tests are failing.. Locally all tests have passed without error |
That's a known issue that may be caused by an underlying bug in the JDK. I'd like Embedded Mongo to retry in that case, but the suggestion didn't get any traction. |
* pr/15496: Polish "Allow easy customization of EmbeddedMongo DownloadConfig" Allow easy customization of EmbeddedMongo DownloadConfig
@mgmeiner thank you for making your first contribution to Spring Boot. This is now merged in |
This PR introduces 2 new configuration properties to allow easy customization of the DownloadPath of a mongodb.
spring.mongodb.embedded.download.path
= custom download urlspring.mongodb.embedded.download.user-agent
= custom User-Agent HTTP-Header for the download requestWe need this due to some special security rules in our company which prevents us from downloading the binaries directly from mongodb. With this PR it is possible to easy override the default download-path and point it to our own server.
Also it is now possible to easy create a completely custom DownloadConfig by simply providing a bean which implements
IDownloadConfig