Skip to content

Commit

Permalink
Adding Ignorable default uri value
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Wiens committed Nov 14, 2024
1 parent 77c5784 commit 73f478e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void configureClientSettings(MongoClientSettings.Builder builder) {

String uri = "";

if(overrideURI != null && !overrideURI.isEmpty()){
if(overrideURI != null && !overrideURI.isEmpty() && !overrideURI.equals("null")){
uri = overrideURI;
}else{
uri = "mongodb://"+username+":"+password+"@"+host+":"+port+"/"+db + "?authSource="+authenticationDatabase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spring.data.mongodb.port=27017
spring.data.mongodb.username=${CM_MONGO_API_USERNAME:api}
spring.data.mongodb.password=${CM_MONGO_API_PASSWORD:api}
spring.data.mongodb.authenticationDatabase=${CM_MONGO_AUTH_DB:CV}
spring.data.mongodb.uri=${CM_MONGO_URI:""}
spring.data.mongodb.uri=${CM_MONGO_URI:null}


cmServerURL = ${CM_SERVER_URL:http://localhost:8082}
Expand Down

0 comments on commit 73f478e

Please sign in to comment.