A set of some common useful libraries.
| version | JDK version |
|---|---|
| 4.x | JDK 21+ |
| 3.x | JDK 17+ |
| older | JDK 11+ |
<pom>
<dependencyManagement>
<dependencies>
<!-- BOM -->
<dependency>
<groupId>com.github.fmjsjx</groupId>
<artifactId>libcommon-bom</artifactId>
<version>4.3.0-alpha2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Common Utility -->
<dependency>
<groupId>com.github.fmjsjx</groupId>
<artifactId>libcommon-util</artifactId>
</dependency>
<!-- JSON library based on Jackson3 -->
<dependency>
<groupId>com.github.fmjsjx</groupId>
<artifactId>libcommon-json-jackson3</artifactId>
</dependency>
<!-- JSON library based on Jsoniter -->
<dependency>
<groupId>com.github.fmjsjx</groupId>
<artifactId>libcommon-json-jsoniter</artifactId>
</dependency>
</dependencies>
</pom>repositories {
mavenCentral
}
dependencies {
// BOM
implementation platform('com.github.fmjsjx:libcommon-bom:4.3.0-alpha2')
// Common Utility
implementation 'com.github.fmjsjx:libcommon-util'
// JSON library based on Fastjson2
implementation 'com.github.fmjsjx:libcommon-json-fastjson2'
// JSON library based on Jackson3
implementation 'com.github.fmjsjx:libcommon-json-jackson3'
// JSON library based on Json-Iter
implementation 'com.github.fmjsjx:libcommon-json-jsoniter'
}repositories {
mavenCentral()
}
dependencies {
// BOM
implementation(platform("com.github.fmjsjx:libcommon-bom:4.3.0-alpha2"))
// Common Utility
implementation("com.github.fmjsjx:libcommon-util")
// JSON library based on Fastjson2
implementation("com.github.fmjsjx:libcommon-json-fastjson2")
// JSON library based on Jackson3
implementation("com.github.fmjsjx:libcommon-json-jackson3")
// JSON library based on Json-Iter
implementation("com.github.fmjsjx:libcommon-json-jsoniter")
}There are a number of modules in LibCommon, here is a quick overview:
The libcommon-util module provides some common utility classes, additional functional interfaces, additional collection/map utilities.
The libcommon-json module provides a library interface to encode/decode JSON.
The libcommon-json-fastjson2 module provides an implementation of libcommon-json based on Fastjson2.
The libcommon-json-jackson2 module provides an implementation of libcommon-json based on Jackson2.
The libcommon-json-jackson3 module provides an implementation of libcommon-json based on Jackson3.
The libcommon-json-jsoniter module provides an implementation of libcommon-json based on json-iterator.
The libcommon-jwt module provides a library to build/parse JWTs.
The libcommon-prometheus-client module provides Hotspot JVM metrics exports, that allow users set custom labels, based on prometheus client java.
The libcommon-redis module provides additional utility functions and optional kotlin extensions for Lettuce.
The libcommon-bson module provides some additional utility functions and optional kotlin extensions for BSON.