The documentation for the property spring.data.mongodb.uri states that the property Overrides host, port, username, password, and database.. This is not correct as the the spring.data.mongodb.database property takes precedence over the database in the uri property.