Skip to content
virtualWinter edited this page Aug 30, 2025 · 2 revisions

Welcome to the Storage Library Wiki!

This is a simple Java library for interacting with MongoDB and Redis, using an annotation-driven approach for ease of use.

Features

MongoDB

  • Annotation-driven mapping for POJOs (@Document, @Id, @Field, @Transient, @Indexed).
  • Automatic handling of POJO serialization and deserialization.
  • A simple Mongo class for managing the connection and accessing collections.
  • Automatic index creation based on the @Indexed annotation.

Redis

  • Annotation-driven publish/subscribe messaging (@RedisListener, @RedisSender).
  • Typed packet system for sending and receiving Java objects.
  • A simple Redis class for managing the connection, publishing messages, and registering listeners.

Installation

This project is available on GitHub Packages.

Maven

Add the following to your pom.xml:

<repositories>
    <repository>
        <id>github</id>
        <url>https://maven.pkg.github.com/CatMC-Network</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>club.catmc.utils.storage</groupId>
        <artifactId>storage</artifactId>
        <version>1.0-SNAPSHOT</version>
    </dependency>
</dependencies>

Gradle (Groovy)

Add the following to your build.gradle:

repositories {
    maven {
        url = uri("https://maven.pkg.github.com/CatMC-Network")
    }
}

dependencies {
    implementation 'club.catmc.utils.storage:storage:1.0-SNAPSHOT'
}

Gradle (Kotlin)

Add the following to your build.gradle.kts:

repositories {
    maven {
        url = uri("https://maven.pkg.github.com/CatMC-Network")
    }
}

dependencies {
    implementation("club.catmc.utils.storage:storage:1.0-SNAPSHOT")
}

Clone this wiki locally