| Crates.io | spring-axum-macros |
| lib.rs | spring-axum-macros |
| version | 0.1.3 |
| created_at | 2025-10-13 15:34:24.724044+00 |
| updated_at | 2025-10-17 15:51:51.924561+00 |
| description | Procedural macros for spring-axum: auto discovery, controllers, components, interceptors, transactions, caching, events, and SQL/Mapper. |
| homepage | https://gitee.com/luzhihaoTestingLab/spring-axum |
| repository | https://gitee.com/luzhihaoTestingLab/spring-axum.git |
| max_upload_size | |
| id | 1880678 |
| size | 24,565 |
Procedural macros for spring-axum: auto discovery, controllers, components, interceptors, transactions, caching, events, and SQL/Mapper.
Repository: https://gitee.com/luzhihaoTestingLab/spring-axum.git
use spring_axum_macros::{controller, route_get, component, interceptor, transactional, cacheable, event_listener, sql, mapper};
#[controller(hello)]
struct UserController;
#[route_get("/users/:id")]
async fn get_user(id: i64) -> String { format!("{}", id) }
#[component]
#[derive(Default)]
struct MyService;
#[interceptor]
#[derive(Default, Clone)]
struct MyInterceptor;
#[mapper]
impl UserMapper {
#[sql("SELECT * FROM users WHERE id = #{id}")]
async fn find_by_id(&self, id: i64) -> anyhow::Result<User> { todo!() }
}
See the root repository README for detailed usage.
MIT