Skip to content

microsphere-projects/microsphere-spring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microsphere Spring

Microsphere Projects for Spring Framework

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

The Microsphere Spring framework is built upon a sophisticated multi-layered architecture that enhances standard Spring Framework capabilities through modular extensions and advanced integration patterns. This architecture focuses on providing enhanced dependency injection, event processing, web endpoint management, and caching capabilities while maintaining seamless compatibility with existing Spring applications.

Purpose and Scope

Microsphere Spring aims to address common challenges and limitations in Spring applications by offering:

  1. Enhanced bean lifecycle management with dependency analysis and parallel instantiation
  2. Extended configuration system with listenable environment and advanced property resolution
  3. Improved web framework capabilities for both Spring MVC and WebFlux
  4. Flexible event processing with interception mechanisms
  5. Integration with additional technologies like Google Guice and P6Spy for JDBC monitoring

Modules

Module Purpose Key Features
microsphere-spring-parent Parent POM with dependency management Centralized version control, dependency BOMs
microsphere-spring-dependencies External dependency versions Framework compatibility matrix
microsphere-spring-context Core Spring Context enhancements Bean utilities, configuration management
microsphere-spring-web Web framework extensions Endpoint mapping, request handling
microsphere-spring-webmvc Spring MVC specific extensions Controller enhancements, method support
microsphere-spring-webflux Reactive web extensions WebFlux utilities, reactive patterns
microsphere-spring-jdbc Database access enhancements Connection utilities, query support
microsphere-spring-guice Google Guice integration Dependency injection bridge
microsphere-spring-test Testing framework integration Test utilities, mocking support

Getting Started

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

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

${microsphere-spring.version} has two branches:

Branches Purpose Latest Version
0.2.x Compatible with Spring Framework 6.0.x - 6.2.x 0.2.3
0.1.x Compatible with Spring Framework 4.3.x - 5.3.x 0.1.3

Then add the specific modules you need:

<dependencies>
    <!-- Microsphere Spring Context -->
    <dependency>
        <groupId>io.github.microsphere-projects</groupId>
        <artifactId>microsphere-spring-context</artifactId>
    </dependency>
</dependencies>

Example : Auto-Refreshable Spring @PropertySource variant - @ResourcePropertySource

  1. To add The Java Properties resource(located classpath META-INF/test/a.properties):
a=1
b=3
  1. To add the test class for @ResourcePropertySource:
@ExtendWith(SpringExtension.class)
@ContextConfiguration
@ResourcePropertySource(
        name = "test-property-source",
        value = "classpath*:/META-INF/test/*.properties",
        autoRefreshed = true
)
class PropertySourceExtensionAttributesTest {

    @Autowired
    private Environment environment;

    @Test
    void test() {
        assertEquals("1", environment.getProperty("a"));
    }

}

If the resource META-INF/test/a.properties is modified, the @ResourcePropertySource will be automatically refreshed, and the Environment will be updated with the new property values.

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-spring.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 Spring is released under the Apache License 2.0.

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages