I need a mongodb connection string like this:
spring.data.mongodb.uri=mongodb://localhost:27017/itr-devel?authSource=admin
I set these properties in the config expecting it to work:
spring.data.mongodb.host=localhost
spring.data.mongodb.port=27017
spring.data.mongodb.database=itr-devel
spring.data.mongodb.username=root
spring.data.mongodb.password=Welcome^1
spring.data.mongodb.authentication-database=admin
The authentication-database is ignored if the database value is set.
With the above properties, I should get this URI: mongodb://localhost:27017/itr-devel?authSource=admin
Comment From: wilkinsona
Duplicates #35567.