(require '[java-properties.core :as jconf])
;; nil
(def conf-simple (jconf/load-config "test"))
;; conf-simple
;; {:backend {:0 {:enabled true, :bootstrap-servers "127.0.0.1:9092", :type "kafka", :name "test"}, :2 {:type "http", :name "weak-connection-api", :method "post"}}, :front {:2 {:0 {:mode some}, :1 {:type ttt}}, :4 {:2 {:type 1, :mode zzz}}}, :core {:test-list a, :journal {:port 26333}}}
(def conf-full (jconf/load-config "test" {:with-arrays true}))
;; conf-full
;; {:backend [{:enabled true, :bootstrap-servers "127.0.0.1:9092", :type "kafka", :name "test"} nil {:type "http", :name "weak-connection-api", :method "post"}], :front [nil nil [{:mode some} {:type ttt}] nil [nil nil {:type 1, :mode zzz}]], :core {:test-list a, :journal {:port 26333}}}
(slurp "ext.properties")
;; "external.property.name = foo"
(def conf-full-override (jconf/load-config "test" {:with-arrays true :config "./ext.properties"}))
;; conf-full-override
;; {:backend [{:enabled true, :bootstrap-servers "127.0.0.1:9092", :type "kafka", :name "test"} nil {:type "http", :name "weak-connection-api", :method "post"}], :front [nil nil [{:mode some} {:type ttt}] nil [nil nil {:type 1, :mode zzz}]], :core {:test-list a, :journal {:port 26333}}, :external {:property {:name foo}}}