diff --git a/pom.xml b/pom.xml
index 9198f78..6629920 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
fr.insee.knowledge
knowledge
- 0.1.4
+ 0.1.5
jar
Knowledge-Back-Office
Back-office services for Knowledge
diff --git a/src/main/java/fr/insee/knowledge/configuration/MongoConfiguration.java b/src/main/java/fr/insee/knowledge/configuration/MongoConfiguration.java
index 6cfab26..ab576fa 100644
--- a/src/main/java/fr/insee/knowledge/configuration/MongoConfiguration.java
+++ b/src/main/java/fr/insee/knowledge/configuration/MongoConfiguration.java
@@ -3,8 +3,6 @@
import com.mongodb.client.MongoClient;
import com.mongodb.client.MongoClients;
import com.mongodb.client.MongoDatabase;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -16,19 +14,10 @@ public class MongoConfiguration {
@Value("${mongodb.database}")
private String database;
- @Value("${mongodb.username}")
- private String username;
- @Value("${mongodb.password}")
- private String password;
- @Value("${mongodb.host}")
- private String host;
-
- private final static Logger LOGGER = LoggerFactory.getLogger(MongoConfiguration.class);
-
+ @Value("${mongodb.uri}")
+ private String mongoUri;
private MongoClient mongoClient() {
- String mongoUri = String.format("mongodb://%s:%s@%s:27017/%s?authSource=%s", username, password, host, database, database);
- LOGGER.info(String.format("MongoURI : %s", mongoUri));
return MongoClients.create(mongoUri);
}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 7fa9dc1..1da37af 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -3,9 +3,7 @@ spring.profiles.active=dev
#Cors
fr.insee.knowledge.application.crosOrigin=*
#MongoDB
-mongodb.database=database
-mongodb.host=host
-mongodb.username=username
-mongodb.password=password
+mongodb.database=defaultdb
+mongodb.uri=mongodb://username:password@127.0.0.1:27017/defaultdb
#Repository Github Data
fr.insee.knowledge.git.access.rawrepository=https://raw.githubusercontent.com/ddecrulle/Knowledge-Data/main/