如何列出处理函数上的所有路由?我正在寻找类似于 Rails' 的行为rake routes
。例如:
(defroutes foo-routes
(GET "/foo/:foo-id"
[foo-id]
"bar response")
(GET "/bar/:bar-id"
[bar-id]
"foo response"))
Run Code Online (Sandbox Code Playgroud)
那么是否可以从 foo-bar-routes 中提取包含以下内容的地图?
{:GET "/foo/:foo-id"
:GET "/bar/:bar-id"}
Run Code Online (Sandbox Code Playgroud)