Browse Source

Merge pull request #3 from myfreeweb/master

Update and improve Compojure
TechEmpower 12 years ago
parent
commit
763bb88d1f

+ 4 - 3
compojure/hello/project.clj

@@ -1,10 +1,11 @@
 (defproject hello "compojure"
 (defproject hello "compojure"
   :description "JSON/Database tests"
   :description "JSON/Database tests"
   :url "http://example.com/FIXME"
   :url "http://example.com/FIXME"
-  :dependencies [[org.clojure/clojure "1.4.0"]
+  :dependencies [[org.clojure/clojure "1.5.1"]
                  [compojure "1.1.5"]
                  [compojure "1.1.5"]
-                 [ring/ring-json "0.1.2"]
-                 [korma "0.3.0-RC2"]
+                 [ring/ring-json "0.2.0"]
+                 [korma "0.3.0-RC5"]
+                 [log4j "1.2.15" :exclusions [javax.mail/mail javax.jms/jms com.sun.jdmk/jmxtools com.sun.jmx/jmxri]]
                  [mysql/mysql-connector-java "5.1.6"]
                  [mysql/mysql-connector-java "5.1.6"]
                  ]
                  ]
   :plugins [[lein-ring "0.8.2"]]
   :plugins [[lein-ring "0.8.2"]]

+ 7 - 7
compojure/hello/src/hello/handler.clj

@@ -9,13 +9,13 @@
 
 
 ; Database connection
 ; Database connection
 (defdb db (mysql {:db "hello_world"
 (defdb db (mysql {:db "hello_world"
-                       :user "benchmarkdbuser"
-                       :password "benchmarkdbpass"
-                       ;;OPTIONAL KEYS
-                       :host "localhost"
-                       :port "3306"
-                       :delimiters "" ;; remove delimiters
-                       :maximum-pool-size 256
+                  :user "benchmarkdbuser"
+                  :password "benchmarkdbpass"
+                  ;;OPTIONAL KEYS
+                  :host "localhost"
+                  :port "3306"
+                  :delimiters "" ;; remove delimiters
+                  :maximum-pool-size 256
                   }))
                   }))
 
 
 ; Set up entity World and the database representation
 ; Set up entity World and the database representation

+ 7 - 0
compojure/hello/src/log4j.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+  <logger name="com.mchange">
+    <level value="WARN"/>
+  </logger>
+</log4j:configuration>