运行 compojure with ring 来自 Intellij IDEA REPL
Running compojure with ring from Intellij IDEA REPL
我一直在努力从 IntelliJ Idea 启动基于 compojure 的应用程序,我按照此 Whosebug 答案中提供的说明进行操作
How to use compojure from Intellij
然而,当我尝试加载我的处理程序时,我得到 *ClassNotFoundException*
(use hello-compojure.handler)
Syntax error (ClassNotFoundException) compiling at (form-init4214569335684752102.clj:1:1).
hello_compojure.handler
下面是处理代码
(ns hello-compojure.handler
(:require [compojure.core :refer :all]
[compojure.route :as route]
[ring.middleware.defaults :refer [wrap-defaults site-defaults]]))
(defroutes app-routes
(GET "/" [] "Hello World")
(GET "/hello" [] "hello second world")
(route/not-found "Not Found"))
(def app
(wrap-defaults app-routes site-defaults))
有人对这种类型的设置有经验吗?
原来我在 require
语句
中漏掉了 '
Connecting to local nREPL server...
Clojure 1.10.0
nREPL server started on port 33629 on host 127.0.0.1 - nrepl://127.0.0.1:33629
(require 'ring.adapter.jetty)
=> nil
(require 'hecompojure.handler)
=> nil
(ring.adapter.jetty/run-jetty hecompojure.handler/app {:port 3004})
2019-04-05 14:05:34.766:INFO:oejs.Server:jetty-7.6.13.v20130916
2019-04-05 14:05:34.800:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:3004
我一直在努力从 IntelliJ Idea 启动基于 compojure 的应用程序,我按照此 Whosebug 答案中提供的说明进行操作
How to use compojure from Intellij
然而,当我尝试加载我的处理程序时,我得到 *ClassNotFoundException*
(use hello-compojure.handler)
Syntax error (ClassNotFoundException) compiling at (form-init4214569335684752102.clj:1:1).
hello_compojure.handler
下面是处理代码
(ns hello-compojure.handler
(:require [compojure.core :refer :all]
[compojure.route :as route]
[ring.middleware.defaults :refer [wrap-defaults site-defaults]]))
(defroutes app-routes
(GET "/" [] "Hello World")
(GET "/hello" [] "hello second world")
(route/not-found "Not Found"))
(def app
(wrap-defaults app-routes site-defaults))
有人对这种类型的设置有经验吗?
原来我在 require
语句
'
Connecting to local nREPL server...
Clojure 1.10.0
nREPL server started on port 33629 on host 127.0.0.1 - nrepl://127.0.0.1:33629
(require 'ring.adapter.jetty)
=> nil
(require 'hecompojure.handler)
=> nil
(ring.adapter.jetty/run-jetty hecompojure.handler/app {:port 3004})
2019-04-05 14:05:34.766:INFO:oejs.Server:jetty-7.6.13.v20130916
2019-04-05 14:05:34.800:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:3004