|
|
|
|
|
by vbsteven
1770 days ago
|
|
The Spring framework (Java) does the same thing for controller methods. If you need an authenticated user, or a model object, or a path variable, just add it to the method signature and the framework will provide it. I don’t know if there is a term for this concept. I’ve always seen it as some form of Dependency Injection/IoC but at the method level instead of object creation. IIRC the Actix web framework in Rust does something similar for handler functions. |
|