Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Clojure 中使用 Compojure 开发了两个不同的 Web 应用程序。每个都使用 defroutes 来创建它的处理程序。
如何将defroutes的两种不同定义组合成一个defroute?我想将第一个应用程序的路线重用到第二个应用程序中。
您可以使用compojure.core/routes来组合路由:
(def my-handler (routes some-handler some-other-handler))