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)),