0
以下組合路線有效。組合路線時發生錯誤
(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))