diff --git a/src/main/java/icurriculum/global/config/SSHMongoConfig.java b/src/main/java/icurriculum/global/config/SSHMongoConfig.java index 7fc70a5..29d52f5 100644 --- a/src/main/java/icurriculum/global/config/SSHMongoConfig.java +++ b/src/main/java/icurriculum/global/config/SSHMongoConfig.java @@ -43,12 +43,12 @@ public MongoClient mongoClient() { String host = databaseEndpoint; int port = databasePort; - if (isServer.equals("false")) { - log.info("isServer value: {}", isServer); - Integer forwardedPort = initializer.buildSshConnection(databaseEndpoint, databasePort); - host = "localhost"; - port = forwardedPort; - } +// if (isServer.equals("false")) { + log.info("isServer value: {}", isServer); + Integer forwardedPort = initializer.buildSshConnection(databaseEndpoint, databasePort); + host = "localhost"; + port = forwardedPort; +// } try { ConnectionString connectionString = new ConnectionString(String.format( @@ -66,7 +66,6 @@ public MongoClient mongoClient() { log.info("mongo connection through SSH: host={}, port={}", host, port); - return MongoClients.create(mongoClientSettings); } catch (Exception e) { log.error("Failed to create MongoClient: {}", e.getMessage(), e);