Clojure 匹配整个路径

Clojure 匹配整个路径,clojure,compojure,Clojure,Compojure,匹配整个路径的正确方法是什么 (defroutes app (ANY "*" [*] {:status 200 :headers {"Content-Type" "text/plain"} :body (str "path = " *)})) 工作正常,但它也给了我编译器警告警告:*不应用作路由绑定。 (defroutes app (ANY "*" [path] {:status 200 :headers {"

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

(defroutes app
  (ANY "*" [*]
       {:status 200
        :headers {"Content-Type" "text/plain"}
        :body (str "path = " *)}))
工作正常,但它也给了我编译器警告
警告:*不应用作路由绑定。

(defroutes app
  (ANY "*" [path]
       {:status 200
        :headers {"Content-Type" "text/plain"}
        :body (str "path = " path)}))
编译时没有警告,但不会将路径绑定到路径。

它看起来像

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