Skip to content

About

The microsphere project for MyBatis

Resources

Code of conduct

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

475 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microsphere MyBatis

Microsphere Projects for MyBatis

Ask DeepWiki Maven Build Codecov Maven License

Microsphere MyBatis is a lightweight extension framework for MyBatis that provides powerful SQL statement interception capabilities. It enables developers to monitor, modify, or enhance SQL execution without changing your existing MyBatis code base.

Purpose and Scope

Microsphere MyBatis is provides an extensible framework for enhancing MyBatis functionality through a sophisticated interception pipeline. The framework enables developers to inject custom processing logic into MyBatis database operations without modifying existing application code, following the principle of separation of concerns:

  • Monitor SQL execution for logging, metrics, and observability
  • Apply cross-cutting concerns to SQL operations (security, throttling, caching)
  • Enhance SQL execution with additional capabilities
  • Integrate with other Microsphere projects like Sentinel, Resilience4j, and Observability

Modules

Module Purpose
microsphere-mybatis-core Core MyBatis framework
microsphere-mybatis-test Base testing utilities and infrastructure
microsphere-mybatis-spring Spring Framework integration and configuration
microsphere-mybatis-spring-test Spring Testing integration
microsphere-mybatis-spring-boot Spring Boot auto-configuration and properties
microsphere-mybatis-spring-cloud Spring Cloud features integration
microsphere-mybatis-parent Spring-specific testing utilities
microsphere-mybatis-dependencies Bill of Materials (BOM) for dependency management

Getting Started

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

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

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

Branches Purpose Latest Version
main Compatible with Spring Cloud 2022.0.x - 2025.0.x 0.2.16
1.x Compatible with Spring Cloud Hoxton - 2021.0.x 0.1.16

Then add the specific modules you need.

Maven Dependencies

<dependencies>
    <!-- Microsphere MyBatis Core -->
    <dependency>
        <groupId>io.github.microsphere-projects</groupId>
        <artifactId>microsphere-mybatis-core</artifactId>
    </dependency>
</dependencies>

Gradle Dependencies

implementation(platform("io.github.microsphere-projects:microsphere-mybatis-core:${microsphere.mybatis.version}"))

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-mybatis.git
  1. Build the source:
  • Linux/MacOS:
./mvnw build
  • Windows:
mvnw.cmd build

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

In-Repository Documentation

Guide Description English 中文
Docs Home Navigation for both guides and both version lines docs/README.md docs/zh/README.md
User Guide Per-module API reference, code examples, version compatibility (current = release / 0.2.x, 1.x = release-1.x / 0.1.x) docs/user-guide/README.md docs/user-guide/zh/README.md
Developer Guide Architecture design, source analysis, design patterns, and Mermaid flow diagrams docs/developer-guide/README.md docs/developer-guide/zh/README.md

User Guide

DeepWiki Host

ZRead Host

Wiki

Github Host

JavaDoc

License

Microsphere MyBatis is licensed under the Apache License, Version 2.0.

About

The microsphere project for MyBatis

Resources

Code of conduct

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages