匹配整个路径

时间:2016-02-21 00:08:32

标签: clojure compojure

匹配整条路径的正确方法是什么?

(defroutes app
  (ANY "*" [*]
       {:status 200
        :headers {"Content-Type" "text/plain"}
        :body (str "path = " *)}))

有效,但它也给了我编译器警告WARNING: * should not be used as a route binding.

(defroutes app
  (ANY "*" [path]
       {:status 200
        :headers {"Content-Type" "text/plain"}
        :body (str "path = " path)}))

在没有警告的情况下进行编译,但不会将path绑定到路径上。

1 个答案:

答案 0 :(得分:0)

看起来像是

gdb

的工作原理。