Welcome to the Microsphere Java Framework
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.
- Core Utilities
- I/O
- Collection manipulation
- Class loading
- Concurrency
- Reflection
- Networking
- Artifact management
- Event Sourcing
- JMX
- Versioning
- Annotation processing
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 |
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>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"));
}
}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:
- Clone the repository:
git clone https://github.com/microsphere-projects/microsphere-java.git- Build the source:
- Linux/MacOS:
./mvnw package- Windows:
mvnw.cmd packageWe welcome your contributions! Please read Code of Conduct before submitting a pull request.
- 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.
The Microsphere Java is released under the Apache License 2.0.