【发布时间】:2013-02-24 02:20:47
【问题描述】:
以下组合路由有效。
(defroutes app-routes
(GET "/" [] (index))
(GET "/twauth" [] (tw/authorize))
(ANY "/twcallback" [] (do
(tw/callback)
(index)))
(route/resources "/")
(route/not-found "Not Found"))
(def app (handler/site app-routes))
但是我收到以下错误。它抛出一个 java.nullpointer.exception。我在这里做错了什么?
(defroutes 应用程序路由 (GET "/" [] (索引)) (GET "/twauth" [] (tw/授权)) (ANY "/twcallback" [] (做 (tw/回调) (索引))))
(defroutes base-routes
(route/resources "/")
(route/not-found "Not Found"))
(def app
(-> app-routes
base-routes
handler/site))
【问题讨论】: