以下复合路线有效。
(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 app-routes (GET "/" [] (index)) (GET "/twauth" [] (tw/authorize)) (ANY "/twcallback" [] (do (tw/callback) (index))) )
(defroutes base-routes
(route/resources "/")
(route/not-found "Not Found"))
(def app
(-> app-routes
base-routes
handler/site))