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
无法使用Spring和Clojure记录事件_Spring_Clojure_Log4j - Fatal编程技术网

无法使用Spring和Clojure记录事件

无法使用Spring和Clojure记录事件,spring,clojure,log4j,Spring,Clojure,Log4j,我正在使用Spring框架和Clojure创建一个web应用程序。为此,我创建了一个扩展AbstractUrlHandlerMapping的类,然后注册了两个处理程序,如图所示: (:use [clojure.tools.logging :only (debug info error)]) (defn -post-init [this] (do (.registerHandler this "/services.html" (proxy [AbstractControl

我正在使用Spring框架和Clojure创建一个web应用程序。为此,我创建了一个扩展
AbstractUrlHandlerMapping
的类,然后注册了两个处理程序,如图所示:

(:use [clojure.tools.logging :only (debug info error)])
(defn -post-init [this]
  (do
    (.registerHandler this "/services.html"
       (proxy [AbstractController] []
         (handleRequestInternal [request response]
           (info "Hello everyone")
           (ModelAndView. "services" "lof" "List of services")
          )
         )
      )....

Spring框架生成的所有事件都记录在日志文件中(在类路径中配置了log4j.properties),但没有记录任何应用程序消息

与问题无关,但换行上的近距比较不寻常(其他人会称之为非惯用语)。你看过compojure和hiccup吗?因为如果您使用clojure,我怀疑spring是最好的方式……代码看起来不完整:ns声明的其余部分在哪里?你确定正在调用代码吗?