【发布时间】:2015-02-22 23:58:52
【问题描述】:
我有一个defroutes 喜欢:
(defroutes app-routes
(context "first" []
(GET "/" [] "first first"))
(context "second" []
(GET "/" [] "first second")))
但当我尝试访问 /second 时,我只收到 404。我该怎么办?
【问题讨论】:
我有一个defroutes 喜欢:
(defroutes app-routes
(context "first" []
(GET "/" [] "first first"))
(context "second" []
(GET "/" [] "first second")))
但当我尝试访问 /second 时,我只收到 404。我该怎么办?
【问题讨论】:
次要但重要的细节:您在上下文声明中缺少前导斜杠,例如“/first”,而不是“first”。
(defroutes 应用程序路由 (上下文“/第一”[] (GET "/" [] "先到先")) (上下文“第二”[] (GET "/" [] "第一秒")))
【讨论】: