Merge pull request #44384 from nosan

* pr/44384:
  Polish contribution
  Clarify which Mongo properties are ignored when URI property is set

Closes gh-44384
This commit is contained in:
Stéphane Nicoll 2025-02-22 18:38:06 +01:00
commit acfdd1127d
1 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2023 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -52,17 +52,17 @@ public class MongoProperties {
public static final String DEFAULT_URI = "mongodb://localhost/test"; public static final String DEFAULT_URI = "mongodb://localhost/test";
/** /**
* Mongo server host. Cannot be set with URI. * Mongo server host. Ignored if 'uri' is set.
*/ */
private String host; private String host;
/** /**
* Mongo server port. Cannot be set with URI. * Mongo server port. Ignored if 'uri' is set.
*/ */
private Integer port = null; private Integer port = null;
/** /**
* Additional server hosts. Cannot be set with URI or if 'host' is not specified. * Additional server hosts. Ignored if 'uri' is set or if 'host' is omitted.
* Additional hosts will use the default mongo port of 27017. If you want to use a * Additional hosts will use the default mongo port of 27017. If you want to use a
* different port you can use the "host:port" syntax. * different port you can use the "host:port" syntax.
*/ */
@ -86,17 +86,17 @@ public class MongoProperties {
private final Gridfs gridfs = new Gridfs(); private final Gridfs gridfs = new Gridfs();
/** /**
* Login user of the mongo server. Cannot be set with URI. * Login user of the mongo server. Ignored if 'uri' is set.
*/ */
private String username; private String username;
/** /**
* Login password of the mongo server. Cannot be set with URI. * Login password of the mongo server. Ignored if 'uri' is set.
*/ */
private char[] password; private char[] password;
/** /**
* Required replica set name for the cluster. Cannot be set with URI. * Required replica set name for the cluster. Ignored if 'uri' is set.
*/ */
private String replicaSetName; private String replicaSetName;