#[middlewares]Expand description
To use these Procedural Macros, you need to add spring-web dependency
Applies middleware layers to all route handlers within a module.
§Syntax
#[middlewares(middleware1, middleware2, ...)]
mod module_name {
// route handlers
}§Arguments
middleware1,middleware2, etc. - Middleware expressions that will be applied to all routes in the module
This macro generates a router function that applies the specified middleware to all route handlers defined within the module.