Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Clojure uberwar无法定位hiccup/core_Clojure - Fatal编程技术网

Clojure uberwar无法定位hiccup/core

Clojure uberwar无法定位hiccup/core,clojure,Clojure,我正在以下网址上阅读教程: 但我在执行时收到一个错误: lein-ring-uberwar 错误是: Caused by: java.io.FileNotFoundException: Could not locate hiccup/core__init.class or hiccup/core.clj on classpath:... 我在另一个stackoverflow线程上读到的内容: 与不带:as的所需命名空间相关 (ns myblog.views (:requ

我正在以下网址上阅读教程:

但我在执行时收到一个错误:
lein-ring-uberwar

错误是:

Caused by: java.io.FileNotFoundException: Could not locate hiccup/core__init.class or hiccup/core.clj on classpath:...
我在另一个stackoverflow线程上读到的内容:

与不带:as的所需命名空间相关

    (ns myblog.views
      (:require [hiccup.core :refer (html)]
.......
我还尝试简单地“使用”它:

    (ns myblog.views
      (:use hiccup.core)
      (:require [hiccup.form :as f]
.......
但我收到了同样的错误

我的代码有什么问题?提前感谢您的任何提示/url

我正在下面复制project.clj文件:

(defproject dgblog "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :min-lein-version "2.0.0"
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [compojure "1.1.9"]
                 [org.clojure/java.jdbc "0.3.0-alpha5"]
                 [mysql/mysql-connector-java "5.1.25"]
                 [ring-basic-authentication "1.0.2"]]
  :plugins [[lein-ring "0.8.12"]]
  :ring {:handler dgblog.handler/app}
  :profiles
  {:dev {:dependencies [[javax.servlet/servlet-api "2.5"]
                        [ring-mock "0.1.5"]]}})
和views.clj标题:

(ns dgblog.views
  (:use hiccup.core)
  (:require
  ;; (:require [hiccup.core :refer (html)]
            [hiccup.form :as f]
            [dgblog.posts :as posts]))

您的
project.clj
引用了哪个版本的hiccup?您好,谢谢您的提示。通过在依赖项列表中添加特定版本[hiccup“1.0.5”]…修复了该问题!