| Crates.io | spring-axum-mybatis |
| lib.rs | spring-axum-mybatis |
| version | 0.1.3 |
| created_at | 2025-10-13 15:34:49.810375+00 |
| updated_at | 2025-10-17 15:52:15.261861+00 |
| description | MyBatis-like SQL mapper integration for spring-axum via #[sql] and #[mapper]. |
| homepage | https://gitee.com/luzhihaoTestingLab/spring-axum |
| repository | https://gitee.com/luzhihaoTestingLab/spring-axum.git |
| max_upload_size | |
| id | 1880679 |
| size | 26,021 |
MyBatis-like SQL mapper integration for spring-axum. Bind SQL to methods via the #[sql] and #[mapper] macros to simplify your data access layer.
Repository: https://gitee.com/luzhihaoTestingLab/spring-axum.git
use spring_axum_macros::{mapper, sql};
#[derive(serde::Deserialize, serde::Serialize)]
struct User { id: i64, name: String }
#[mapper]
impl UserMapper {
#[sql("SELECT id, name FROM users WHERE id = #{id}")]
async fn find_by_id(&self, id: i64) -> anyhow::Result<User> { todo!() }
}
For more details, see the SQL/Mapper section in the root repository README.
MIT