-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Introduce spring.data.mongodb.protocol to allow the MongoDB protocol to be customized when not using spring.data.mongodb.uri #43851
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
Comments
This is similar to #17215, but the proposal there was to inject the separate properties into the URI. This was rejected as it would be a breaking change that would prevent the URI being used to override any other settings. We can consider introducing a In the meantime, please note that you can specify
|
@wilkinsona The example you provided seems worth trying, but the approach I was considering until just now was to manually configure everything, from the connection string to MongoTemplate, without any auto-configuration, using Vault. However, it's a bit unfortunate that mongodb+srv can't be used unless it's through the URI. |
This update allows configuring the MongoDB connection protocol using the 'spring.data.mongodb.protocol' property. See spring-projectsgh-43851 Signed-off-by: Dmytro Nosan <[email protected]>
This commit allows configuring the MongoDB connection protocol using the 'spring.data.mongodb.protocol' property. See spring-projectsgh-43851 Signed-off-by: Dmytro Nosan <[email protected]>
This commit allows configuring the MongoDB connection protocol using the 'spring.data.mongodb.protocol' property. See spring-projectsgh-43851 Signed-off-by: Dmytro Nosan <[email protected]>
This commit allows configuring the MongoDB connection protocol using the 'spring.data.mongodb.protocol' property. See spring-projectsgh-43851 Signed-off-by: Dmytro Nosan <[email protected]>
This commit allows configuring the MongoDB connection protocol using the 'spring.data.mongodb.protocol' property. See spring-projectsgh-43851 Signed-off-by: Dmytro Nosan <[email protected]>
This commit allows configuring the MongoDB connection protocol using the 'spring.data.mongodb.protocol' property. See spring-projectsgh-43851 Signed-off-by: Dmytro Nosan <[email protected]>
This commit allows configuring the MongoDB connection protocol using the 'spring.data.mongodb.protocol' property. See spring-projectsgh-43851 Signed-off-by: Dmytro Nosan <[email protected]>
Superseded by #44366. |
https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/PropertiesMongoConnectionDetails.java#L51
I can't generate a connection string with mongodb+srv:// because PropertiesMongoConnectionDetails is hardcoded to use mongodb://
MongoProperties should be able to specify the protocol, and PropertiesMongoConnectionDetails should generate the connection string using the specified protocol.
The text was updated successfully, but these errors were encountered: