Skip to content

Latest commit

 

History

History
85 lines (70 loc) · 2.12 KB

File metadata and controls

85 lines (70 loc) · 2.12 KB

bson-model

A data object model framework based on BSON/MongoDB.

Note! Version 2.3.x is the last minor version to be released. No new features will be added to this project in the future.

Since version 2.x, all modules are compiled based on JDK-17.

Features

  • Provides mapping ways for multiple data types.
  • Provides APIs for data conversions between object model and BSON document, and supports automatic generation of part update expressions.
  • Provides JSON serialization/deserialization.
  • Provides a Java code generator that can quickly generate data object model code through YAML configuration file.

How to use

All releases will be released to the Maven central repository.

Using maven

pom.xml

<pom>
  <dependencyManagement>
    <dependencies>
      <!-- Choose Version -->
      <dependency>
        <groupId>com.github.fmjsjx</groupId>
        <artifactId>bson-model-bom</artifactId>
        <version>2.3.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <!-- Core Library -->
    <dependency>
      <groupId>com.github.fmjsjx</groupId>
      <artifactId>bson-model-core</artifactId>
    </dependency>
    <!-- Code Generator -->
    <dependency>
      <groupId>com.github.fmjsjx</groupId>
      <artifactId>bson-model-generator</artifactId>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>
</pom>

Using gradle

Groovy DSL

repositories {
    mavenCentral
}

dependencies {
    // Choose Version
    implementation platform('com.github.fmjsjx:bson-model-bom:2.3.0')
    // Core Library
    implementation 'com.github.fmjsjx:bson-model-core'
    // Code Generator
    compileOnly 'com.github.fmjsjx:bson-model-generator'
}

Kotlin DSL

repositories {
    mavenCentral()
}

dependencies {
    // Choose Version
    implementation(platform("com.github.fmjsjx:bson-model-bom:2.3.0"))
    // Core Library
    implementation("com.github.fmjsjx:bson-model-core")
    // Code Generator
    compileOnly("com.github.fmjsjx:bson-model-generator")
}