Бегущая композиция с кольцом от Intellij IDEA REPL - PullRequest
1 голос
/ 05 апреля 2019

Я изо всех сил пытался запустить приложение на основе compojure из IntelliJ Idea, я следовал инструкциям, приведенным в этом ответе stackoverflow

Как использовать compojure из 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))

кто-нибудь с опытом работы с этим типом установки?

1 Ответ

0 голосов
/ 05 апреля 2019

оказывается, я пропустил ' в моем 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
...