spring-axum-mybatis

Crates.iospring-axum-mybatis
lib.rsspring-axum-mybatis
version0.1.3
created_at2025-10-13 15:34:49.810375+00
updated_at2025-10-17 15:52:15.261861+00
descriptionMyBatis-like SQL mapper integration for spring-axum via #[sql] and #[mapper].
homepagehttps://gitee.com/luzhihaoTestingLab/spring-axum
repositoryhttps://gitee.com/luzhihaoTestingLab/spring-axum.git
max_upload_size
id1880679
size26,021
luzhihaoTestingLab (luzhihaoTestingLab)

documentation

https://docs.rs/spring-axum-mybatis

README

spring-axum-mybatis

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

Example

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.

License

MIT

Commit count: 0

cargo fmt