https://github.com/microsphere-projects/microsphere-mybatis
The microsphere project for MyBatis
https://github.com/microsphere-projects/microsphere-mybatis
Last synced: 1 day ago
JSON representation
The microsphere project for MyBatis
- Host: GitHub
- URL: https://github.com/microsphere-projects/microsphere-mybatis
- Owner: microsphere-projects
- License: apache-2.0
- Created: 2025-02-15T08:25:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-03-31T04:06:18.000Z (7 days ago)
- Last Synced: 2026-03-31T05:55:28.275Z (7 days ago)
- Language: Java
- Size: 450 KB
- Stars: 1
- Watchers: 0
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Microsphere MyBatis
> Microsphere Projects for MyBatis
[](https://deepwiki.com/microsphere-projects/microsphere-mybatis)
[](https://zread.ai/microsphere-projects/microsphere-mybatis)
[](https://github.com/microsphere-projects/microsphere-mybatis/actions/workflows/maven-build.yml)
[](https://app.codecov.io/gh/microsphere-projects/microsphere-mybatis)


[](http://isitmaintained.com/project/microsphere-projects/microsphere-mybatis "Average time to resolve an issue")
[](http://isitmaintained.com/project/microsphere-projects/microsphere-mybatis "Percentage of issues still open")
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:
```xml
...
io.github.microsphere-projects
microsphere-mybatis-dependencies
${microsphere-mybatis.version}
pom
import
...
```
`${microsphere-mybatis.version}` has two branches:
| **Branches** | **Purpose** | **Latest Version** |
|--------------|--------------------------------------------------|--------------------|
| **0.2.x** | Compatible with Spring Cloud 2022.0.x - 2025.0.x | 0.2.0 |
| **0.1.x** | Compatible with Spring Cloud Hoxton - 2021.0.x | 0.1.0 |
Then add the specific modules you need.
### Maven Dependencies
```xml
io.github.microsphere-projects
microsphere-mybatis-core
```
### Gradle Dependencies
```kotlin
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:
```bash
git clone https://github.com/microsphere-projects/microsphere-mybatis.git
```
2. Build the source:
- Linux/MacOS:
```bash
./mvnw build
```
- Windows:
```powershell
mvnw.cmd build
```
## Contributing
We welcome your contributions! Please read [Code of Conduct](./CODE_OF_CONDUCT.md) before submitting a pull request.
## Reporting Issues
* Before you log a bug, please search
the [issues](https://github.com/microsphere-projects/microsphere-mybatis/issues)
to see if someone has already reported the problem.
* If the issue doesn't already
exist, [create a new issue](https://github.com/microsphere-projects/microsphere-mybatis/issues/new).
* Please provide as much information as possible with the issue report.
## Documentation
### User Guide
[DeepWiki Host](https://deepwiki.com/microsphere-projects/microsphere-mybatis)
[ZRead Host](https://zread.ai/microsphere-projects/microsphere-mybatis)
### Wiki
[Github Host](https://github.com/microsphere-projects/microsphere-mybatis/wiki)
### JavaDoc
- [microsphere-mybatis-core](https://javadoc.io/doc/io.github.microsphere-projects/microsphere-mybatis-core)
- [microsphere-mybatis-test](https://javadoc.io/doc/io.github.microsphere-projects/microsphere-mybatis-test)
- [microsphere-mybatis-spring](https://javadoc.io/doc/io.github.microsphere-projects/microsphere-mybatis-spring)
- [microsphere-mybatis-spring-test](https://javadoc.io/doc/io.github.microsphere-projects/microsphere-mybatis-spring-test)
- [microsphere-mybatis-spring-boot](https://javadoc.io/doc/io.github.microsphere-projects/microsphere-mybatis-spring-boot)
- [microsphere-mybatis-spring-cloud](https://javadoc.io/doc/io.github.microsphere-projects/microsphere-mybatis-spring-cloud)
## License
Microsphere MyBatis is licensed under
the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).