From 87675fad10588eec5a672e3525476c9ff883cce4 Mon Sep 17 00:00:00 2001 From: GoXLR <107289968+GoXLR@users.noreply.github.com> Date: Wed, 19 Oct 2022 19:30:44 +0200 Subject: [PATCH] ree --- application.yml | 2 +- src/main/java/net/frozenorb/apiv3/config/MongoConfig.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/application.yml b/application.yml index 82472e9..339e4eb 100644 --- a/application.yml +++ b/application.yml @@ -7,7 +7,7 @@ network: rootPermission: minehq http: - port: 80 + port: 81 keystoreFile: keystorePassword: diff --git a/src/main/java/net/frozenorb/apiv3/config/MongoConfig.java b/src/main/java/net/frozenorb/apiv3/config/MongoConfig.java index 8a3fba0..3ed2a13 100644 --- a/src/main/java/net/frozenorb/apiv3/config/MongoConfig.java +++ b/src/main/java/net/frozenorb/apiv3/config/MongoConfig.java @@ -35,6 +35,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import java.time.Instant; +import java.util.Objects; import java.util.UUID; import fr.javatic.mongo.jacksonCodec.JacksonCodecProvider; @@ -63,7 +64,7 @@ public class MongoConfig { .build() ); - MongoDatabase database = mongoClient.getDatabase(connStr.getDatabase()); + MongoDatabase database = mongoClient.getDatabase(Objects.requireNonNull(connStr.getDatabase())); database.getCollection("auditLog").createIndexes(ImmutableList.of( new IndexModel(new Document("user", 1)),