Clojure 如何将webjars资源添加到lib noir';谁的应用程序处理程序?
如何将webjars资源添加到lib noir的应用程序处理程序中 我以前只使用这样的戒指:Clojure 如何将webjars资源添加到lib noir';谁的应用程序处理程序?,clojure,ring,compojure,webjars,lib-noir,Clojure,Ring,Compojure,Webjars,Lib Noir,如何将webjars资源添加到lib noir的应用程序处理程序中 我以前只使用这样的戒指: (def app (-> handler (wrap-resource "public") (wrap-resource "/META-INF/resources") ;;resources from webjars )) 现在我想弄清楚如何使用lib noir实现这一点 我试过这个: (def app (noir-middleware/app
(def app
(-> handler
(wrap-resource "public")
(wrap-resource "/META-INF/resources")
;;resources from webjars
))
现在我想弄清楚如何使用lib noir实现这一点
我试过这个:
(def app (noir-middleware/app-handler [home-routes app-routes]
:ring-defaults {:static
{:resources
"/META-INF/resources"}}))
这是可行的,但我在配置后发布表单时遇到了一个问题。现在响铃请求中的参数为空。这似乎可以做到:
(defroutes app-routes
(route/resources "/")
(route/resources "/" {:root "META-INF/resources/"})
(route/not-found "Not Found"))