Skip to content

microsphere-projects/microsphere-java

Repository files navigation

Microsphere Java Framework

Welcome to the Microsphere Java Framework

Ask DeepWiki zread Maven Build Codecov Maven License Average time to resolve an issue Percentage of issues still open

Introduction

Microsphere Java Framework is a foundational library that serves as the backbone for MicroSphere ecosystem. It provides a rich set of reusable components, utilities, and annotation processing capabilities that address common challenges in Java development. Whether you're building enterprise applications, microservices, or standalone Java tools, this framework offers the building blocks you need to accelerate development and maintain consistency across your projects.

The framework is designed with modularity at its core, allowing you to use only the components you need while keeping your application lightweight and efficient. It's built on standard Java APIs and integrates seamlessly with popular frameworks like Spring, making it a versatile addition to any Java developer's toolkit.

Features

  • Core Utilities
  • I/O
  • Collection manipulation
  • Class loading
  • Concurrency
  • Reflection
  • Networking
  • Artifact management
  • Event Sourcing
  • JMX
  • Versioning
  • Annotation processing

Modules

The framework is organized into several key modules:

Module Purpose
microsphere-java-core Provides core utilities across various domains like annotations, collections, concurrency, etc.
microsphere-annotation-processor Offers annotation processing capabilities for compile-time code generation
microsphere-java-dependencies Manages dependency versions across the project
microsphere-java-parent Parent POM with shared configurations

Getting Started

The easiest way to get started is by adding the Microsphere Java BOM (Bill of Materials) to your project's pom.xml:

<dependencyManagement>
    <dependencies>
        ...
        <!-- Microsphere Dependencies -->
        <dependency>
            <groupId>io.github.microsphere-projects</groupId>
            <artifactId>microsphere-java-dependencies</artifactId>
            <version>${microsphere-java.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        ...
    </dependencies>
</dependencyManagement>

Then add the specific modules you need:

<dependencies>
    <!-- Core utilities -->
    <dependency>
        <groupId>io.github.microsphere-projects</groupId>
        <artifactId>microsphere-java-core</artifactId>
    </dependency>

    <!-- Annotation processing (optional) -->
    <dependency>
        <groupId>io.github.microsphere-projects</groupId>
        <artifactId>microsphere-annotation-processor</artifactId>
    </dependency>
</dependencies>

Quick Examples

import io.microsphere.util.StringUtils;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

public class MicrosphereTest {

    @Test
    public void testStringUtils() {
        assertTrue(StringUtils.isBlank(null));
        assertTrue(StringUtils.isBlank(""));
        assertFalse(StringUtils.isBlank("Hello"));
    }
}

Building from Source

You don't need to build from source unless you want to try out the latest code or contribute to the project.

To build the project, follow these steps:

  1. Clone the repository:
git clone https://github.com/microsphere-projects/microsphere-java.git
  1. Build the source:
  • Linux/MacOS:
./mvnw package
  • Windows:
mvnw.cmd package

Contributing

We welcome your contributions! Please read Code of Conduct before submitting a pull request.

Reporting Issues

  • Before you log a bug, please search the issues to see if someone has already reported the problem.
  • If the issue doesn't already exist, create a new issue.
  • Please provide as much information as possible with the issue report.

Documentation

User Guide

DeepWiki Host

ZRead Host

Wiki

Github Host

JavaDoc

License

The Microsphere Java is released under the Apache License 2.0.

About

The common Java feautres used for the other microsphere sub-projects

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages