Skip to content

Commit

Permalink
hotfix : mongoDB 설정 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
genius00hwan committed Nov 27, 2024
1 parent 035036a commit 2645ba9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion config
19 changes: 0 additions & 19 deletions src/main/java/icurriculum/global/config/SSHMongoConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,8 @@
@RequiredArgsConstructor
public class SSHMongoConfig {

private final SSHConfig initializer;

@Value("${server}")
private String isServer;

@Value("${cloud.aws.ec2.database_endpoint}")
private String databaseEndpoint;

@Value("${cloud.aws.ec2.database_port}")
private int databasePort;

@Value("${spring.data.mongodb.username}")
private String mongoUser;
@Value("${spring.data.mongodb.password}")
Expand All @@ -46,23 +37,13 @@ public class SSHMongoConfig {

@Bean
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;
// }

try {
ConnectionString connectionString = new ConnectionString(String.format(
connectionCommand,
mongoUser,
mongoPassword,
databaseEndpoint,
databaseName,
appName
));

Expand Down

0 comments on commit 2645ba9

Please sign in to comment.