The documentation states: > You can set `spring.data.mongodb.uri` property to change the `url`, or alternatively specify a `host`/`port` However, if you just set the port it has no effect and the uri is used instead.