【发布时间】:2016-07-13 10:04:28
【问题描述】:
运行此代码时:
(:使用'compojure.core) (键(ns-publics 'compojure.core)) (defroutes 应用程序路由 (GET "/" [] "Hello World") (路线/资源“/”) (路线/未找到“未找到”))我收到了这条消息:
CompilerException java.lang.RuntimeException: Unable to resolve symbol: defroutes in this context, 编译:(restful_clojure\routes.clj:5:1)但是当我跑步时:
(键(ns-publics 'compojure.core))它表明定义了宏:
(defroutes PUT POST 路由路由 make-route let-routes DELETE ANY let-request GET HEAD PATCH context OPTIONS)【问题讨论】:
-
您能否发布整个文件并描述您如何运行代码?我刚刚在终端中使用类路径上的 compojure 启动 REPL,它可以工作。